From 141e46faf0d749356ec1de11963527aaea2b3078 Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Mon, 26 Mar 2012 17:03:51 +0000 Subject: add tbaa metadata to vtable pointer loads/stores llvm-svn: 153447 --- clang/lib/CodeGen/CodeGenModule.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 1c8f5f6..cc19d95 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); -- cgit v1.1