aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2022-03-18 13:06:42 +0100
committerNikita Popov <npopov@redhat.com>2022-03-22 09:42:31 +0100
commit767ec883e37510a247ea5695921876ef67cf5b3f (patch)
treeb4febfbddbce026d0fd7531f54d07dd309ff43d3 /clang/lib/CodeGen/CodeGenFunction.h
parenta9656bd1bc3792b81ad5a7277bdf7d8159b3b924 (diff)
downloadllvm-767ec883e37510a247ea5695921876ef67cf5b3f.zip
llvm-767ec883e37510a247ea5695921876ef67cf5b3f.tar.gz
llvm-767ec883e37510a247ea5695921876ef67cf5b3f.tar.bz2
[CodeGen] Avoid deprecated Address ctor in EmitLoadOfPointer()
This requires some adjustment in caller code, because there was a confusion regarding the meaning of the PtrTy argument: This argument is the type of the pointer being loaded, not the addresses being loaded from.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 24000b9..bda44733 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -2527,6 +2527,9 @@ public:
return EmitLoadOfReferenceLValue(RefLVal);
}
+ /// Load a pointer with type \p PtrTy stored at address \p Ptr.
+ /// Note that \p PtrTy is the type of the loaded pointer, not the addresses
+ /// it is loaded from.
Address EmitLoadOfPointer(Address Ptr, const PointerType *PtrTy,
LValueBaseInfo *BaseInfo = nullptr,
TBAAAccessInfo *TBAAInfo = nullptr);