summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2012-03-26 17:03:51 +0000
committerKostya Serebryany <kcc@google.com>2012-03-26 17:03:51 +0000
commit8cb4a070d491ddd671b049110cc8d0accb08b905 (patch)
tree069fdc3e8e7959280024f5ce210b4e2be3cd831a /lib/CodeGen/CodeGenModule.cpp
parent1eb18afd931f626713c066ede0707ceb522fa061 (diff)
add tbaa metadata to vtable pointer loads/stores
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153447 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 1c8f5f65f9..cc19d950fc 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -182,6 +182,12 @@ llvm::MDNode *CodeGenModule::getTBAAInfo(QualType QTy) {
return TBAA->getTBAAInfo(QTy);
}
+llvm::MDNode *CodeGenModule::getTBAAInfoForVTablePtr() {
+ if (!TBAA)
+ return 0;
+ return TBAA->getTBAAInfoForVTablePtr();
+}
+
void CodeGenModule::DecorateInstruction(llvm::Instruction *Inst,
llvm::MDNode *TBAAInfo) {
Inst->setMetadata(llvm::LLVMContext::MD_tbaa, TBAAInfo);