diff options
author | Kostya Serebryany <kcc@google.com> | 2012-03-26 17:03:51 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2012-03-26 17:03:51 +0000 |
commit | 141e46faf0d749356ec1de11963527aaea2b3078 (patch) | |
tree | e163d8b72faf2713c6f7532c140d52bce17d903a /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | db534a4eb97666b5fde75e816bc91cbbb0fdf864 (diff) | |
download | bcm5719-llvm-141e46faf0d749356ec1de11963527aaea2b3078.tar.gz bcm5719-llvm-141e46faf0d749356ec1de11963527aaea2b3078.zip |
add tbaa metadata to vtable pointer loads/stores
llvm-svn: 153447
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 1c8f5f65f93..cc19d950fc8 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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); |