diff options
author | Vlad Tsyrklevich <vlad@tsyrklevich.net> | 2019-01-15 03:38:02 +0000 |
---|---|---|
committer | Vlad Tsyrklevich <vlad@tsyrklevich.net> | 2019-01-15 03:38:02 +0000 |
commit | 86e68fda3b1b3ebe712bb06558b863de2784be29 (patch) | |
tree | 38facfcc854f734b96f6ebaba219b649c3514da1 /clang/lib/CodeGen/CGExprScalar.cpp | |
parent | 2d5b317cfc9837ed5e3886c4b989538176517d62 (diff) | |
download | bcm5719-llvm-86e68fda3b1b3ebe712bb06558b863de2784be29.tar.gz bcm5719-llvm-86e68fda3b1b3ebe712bb06558b863de2784be29.zip |
Revert alignment assumptions changes
Revert r351104-6, r351109, r351110, r351119, r351134, and r351153. These
changes fail on the sanitizer bots.
llvm-svn: 351159
Diffstat (limited to 'clang/lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprScalar.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index 1c14d4c99a2..f53bb33e463 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -258,11 +258,8 @@ public: AVAttr = TTy->getDecl()->getAttr<AlignValueAttr>(); } else { // Assumptions for function parameters are emitted at the start of the - // function, so there is no need to repeat that here, - // unless the alignment-assumption sanitizer is enabled, - // then we prefer the assumption over alignment attribute - // on IR function param. - if (isa<ParmVarDecl>(VD) && !CGF.SanOpts.has(SanitizerKind::Alignment)) + // function, so there is no need to repeat that here. + if (isa<ParmVarDecl>(VD)) return; AVAttr = VD->getAttr<AlignValueAttr>(); @@ -279,8 +276,7 @@ public: Value *AlignmentValue = CGF.EmitScalarExpr(AVAttr->getAlignment()); llvm::ConstantInt *AlignmentCI = cast<llvm::ConstantInt>(AlignmentValue); - CGF.EmitAlignmentAssumption(V, E, AVAttr->getLocation(), - AlignmentCI->getZExtValue()); + CGF.EmitAlignmentAssumption(V, AlignmentCI->getZExtValue()); } /// EmitLoadOfLValue - Given an expression with complex type that represents a |