diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-10-01 02:20:23 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-10-01 02:20:23 +0000 |
commit | e4aaac506c6d3496ae4120b68f03886402c0428c (patch) | |
tree | ac913746423fa9a4802b72f719568c29303c4328 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 6aada32dc48e350b39464fec3106a309e2fcf619 (diff) | |
download | bcm5719-llvm-e4aaac506c6d3496ae4120b68f03886402c0428c.tar.gz bcm5719-llvm-e4aaac506c6d3496ae4120b68f03886402c0428c.zip |
Revert r191586 and r191695. They cause crashes when building with
-relaxed-aliasing.
llvm-svn: 191725
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 17bca0a6f38..6c126718431 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -243,14 +243,14 @@ llvm::MDNode *CodeGenModule::getTBAAStructTagInfo(QualType BaseTy, return TBAA->getTBAAStructTagInfo(BaseTy, AccessN, O); } -/// 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. +/// Decorate the instruction with a TBAA tag. For scalar TBAA, the tag +/// is the same as the type. For struct-path aware TBAA, the tag +/// is different from the type: base type, access type and offset. /// When ConvertTypeToTag is true, we create a tag based on the scalar type. void CodeGenModule::DecorateInstruction(llvm::Instruction *Inst, llvm::MDNode *TBAAInfo, bool ConvertTypeToTag) { - if (ConvertTypeToTag && TBAA) + if (ConvertTypeToTag && TBAA && CodeGenOpts.StructPathTBAA) Inst->setMetadata(llvm::LLVMContext::MD_tbaa, TBAA->getTBAAScalarTagInfo(TBAAInfo)); else |