diff options
author | Ivan A. Kosarev <ikosarev@accesssoftek.com> | 2017-10-02 11:10:04 +0000 |
---|---|---|
committer | Ivan A. Kosarev <ikosarev@accesssoftek.com> | 2017-10-02 11:10:04 +0000 |
commit | 80dc32ec8be97d83ab183c40d08288f650ea1d0f (patch) | |
tree | 33ca9d6ec214347eb12ff6f07a2296686f7aeae2 /lib/CodeGen/CodeGenModule.cpp | |
parent | c6e3259e7046af28706e8c7477bc522875d15956 (diff) |
[CodeGen] Have a special function to get TBAA info for may-alias accesses
This is part of D37826 reworked to be a separate patch to
simplify review.
Differential Revision: https://reviews.llvm.org/D38408
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314660 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 25779c044b..ec122b795c 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -599,6 +599,12 @@ llvm::MDNode *CodeGenModule::getTBAAStructTagInfo(QualType BaseTy, return TBAA->getTBAAStructTagInfo(BaseTy, AccessN, O); } +llvm::MDNode *CodeGenModule::getTBAAMayAliasTypeInfo() { + if (!TBAA) + return nullptr; + return TBAA->getMayAliasTypeInfo(); +} + /// Decorate the instruction with a TBAA tag. For both scalar TBAA /// and struct-path aware TBAA, the tag has the same format: /// base type, access type and offset. |