diff options
author | Eli Friedman <efriedma@quicinc.com> | 2020-05-18 11:29:11 -0700 |
---|---|---|
committer | Eli Friedman <efriedma@quicinc.com> | 2020-05-19 20:21:30 -0700 |
commit | 62f3ef2b537335fde1c17363c9440618b6fefd6a (patch) | |
tree | 0efa6f04dfd20982031f7f2a5b167ad60fdd82cc /clang/lib/CodeGen/CodeGenModule.h | |
parent | 78453e370547b8acd20093ab5d2fc18b7abc52a1 (diff) | |
download | llvm-62f3ef2b537335fde1c17363c9440618b6fefd6a.zip llvm-62f3ef2b537335fde1c17363c9440618b6fefd6a.tar.gz llvm-62f3ef2b537335fde1c17363c9440618b6fefd6a.tar.bz2 |
[CGCall] Annotate references with "align" attribute.
If we're going to assume references are dereferenceable, we should also
assume they're aligned: otherwise, we can't actually dereference them.
See also D80072.
Differential Revision: https://reviews.llvm.org/D80166
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 370fcec..864488c 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -1386,6 +1386,14 @@ public: /// \param QT is the clang QualType of the null pointer. llvm::Constant *getNullPointer(llvm::PointerType *T, QualType QT); + CharUnits getNaturalTypeAlignment(QualType T, + LValueBaseInfo *BaseInfo = nullptr, + TBAAAccessInfo *TBAAInfo = nullptr, + bool forPointeeType = false); + CharUnits getNaturalPointeeTypeAlignment(QualType T, + LValueBaseInfo *BaseInfo = nullptr, + TBAAAccessInfo *TBAAInfo = nullptr); + private: llvm::Constant *GetOrCreateLLVMFunction( StringRef MangledName, llvm::Type *Ty, GlobalDecl D, bool ForVTable, |