aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorSindhu Chittireddy <sindhu.chittireddy@intel.com>2021-12-14 17:40:33 -0800
committerSindhu Chittireddy <sindhu.chittireddy@intel.com>2021-12-14 17:40:33 -0800
commit4706a297fb9ebe6af91ee2c92e5eb196dc2785f7 (patch)
tree977283ac421a93e47b4b83a4b39c200f2650c9e9 /clang/lib/CodeGen/CodeGenFunction.h
parent794b4df5049eb4fa865607724cffd3c9f9225510 (diff)
downloadllvm-4706a297fb9ebe6af91ee2c92e5eb196dc2785f7.zip
llvm-4706a297fb9ebe6af91ee2c92e5eb196dc2785f7.tar.gz
llvm-4706a297fb9ebe6af91ee2c92e5eb196dc2785f7.tar.bz2
Avoid setting tbaa on the store of return type of call to inline assembler.
In 32bit mode, attaching TBAA metadata to the store following the call to inline assembler results in describing the wrong type by making a fake lvalue(i.e., whatever the inline assembler happens to leave in EAX:EDX.) Even if inline assembler somehow describes the correct type, setting TBAA information on return type of call to inline assembler is likely not correct, since TBAA rules need not apply to inline assembler. Differential Revision: https://reviews.llvm.org/D115320
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index ff5b663..2fabeb2 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -2504,6 +2504,13 @@ public:
BaseInfo, TBAAInfo);
}
+ LValue
+ MakeAddrLValueWithoutTBAA(Address Addr, QualType T,
+ AlignmentSource Source = AlignmentSource::Type) {
+ return LValue::MakeAddr(Addr, T, getContext(), LValueBaseInfo(Source),
+ TBAAAccessInfo());
+ }
+
LValue MakeNaturalAlignPointeeAddrLValue(llvm::Value *V, QualType T);
LValue MakeNaturalAlignAddrLValue(llvm::Value *V, QualType T);