diff options
author | Dan Gohman <gohman@apple.com> | 2012-09-28 21:58:29 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2012-09-28 21:58:29 +0000 |
commit | 22695fcec3b206eec0e04c52a089c8b4c520d24b (patch) | |
tree | 07972f1110fb073ede511d9e524d54e5663777e7 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 3852b3e1891939f4cc008025494b07894a408707 (diff) | |
download | bcm5719-llvm-22695fcec3b206eec0e04c52a089c8b4c520d24b.tar.gz bcm5719-llvm-22695fcec3b206eec0e04c52a089c8b4c520d24b.zip |
Add basic support for adding !tbaa.struct metadata on llvm.memcpy calls for
struct assignment.
llvm-svn: 164853
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 0a33e809b35..164031a5038 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -202,6 +202,12 @@ llvm::MDNode *CodeGenModule::getTBAAInfoForVTablePtr() { return TBAA->getTBAAInfoForVTablePtr(); } +llvm::MDNode *CodeGenModule::getTBAAStructInfo(QualType QTy) { + if (!TBAA) + return 0; + return TBAA->getTBAAStructInfo(QTy); +} + void CodeGenModule::DecorateInstruction(llvm::Instruction *Inst, llvm::MDNode *TBAAInfo) { Inst->setMetadata(llvm::LLVMContext::MD_tbaa, TBAAInfo); |