aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ByteCode/Pointer.cpp
diff options
context:
space:
mode:
authorTimm Baeder <tbaeder@redhat.com>2025-03-04 06:17:07 +0100
committerGitHub <noreply@github.com>2025-03-04 06:17:07 +0100
commit82d111e8202328d3a04d923cdae19ad29bc79dbc (patch)
tree6f9e93a8bd95f1460c5ac975f3100a273b277549 /clang/lib/AST/ByteCode/Pointer.cpp
parent3aab3fe56fbd60b49a47ae0f90d96de2cd09fc18 (diff)
downloadllvm-82d111e8202328d3a04d923cdae19ad29bc79dbc.zip
llvm-82d111e8202328d3a04d923cdae19ad29bc79dbc.tar.gz
llvm-82d111e8202328d3a04d923cdae19ad29bc79dbc.tar.bz2
[clang][bytecode][NFC] Minor cleanups (#129553)
Pull local variables in to the closest scope, remove some unnecessary calls to getLocation() and remove an outdated comment.
Diffstat (limited to 'clang/lib/AST/ByteCode/Pointer.cpp')
-rw-r--r--clang/lib/AST/ByteCode/Pointer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/ByteCode/Pointer.cpp b/clang/lib/AST/ByteCode/Pointer.cpp
index 92cfa19..e587640 100644
--- a/clang/lib/AST/ByteCode/Pointer.cpp
+++ b/clang/lib/AST/ByteCode/Pointer.cpp
@@ -384,7 +384,6 @@ void Pointer::initialize() const {
return;
assert(PointeeStorage.BS.Pointee && "Cannot initialize null pointer");
- const Descriptor *Desc = getFieldDesc();
if (isRoot() && PointeeStorage.BS.Base == sizeof(GlobalInlineDescriptor)) {
GlobalInlineDescriptor &GD = *reinterpret_cast<GlobalInlineDescriptor *>(
@@ -393,6 +392,7 @@ void Pointer::initialize() const {
return;
}
+ const Descriptor *Desc = getFieldDesc();
assert(Desc);
if (Desc->isPrimitiveArray()) {
// Primitive global arrays don't have an initmap.