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/CodeGenFunction.h | |
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/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 89cb850ab1b..c8b300236f4 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -131,7 +131,6 @@ enum TypeEvaluationKind { SANITIZER_CHECK(ShiftOutOfBounds, shift_out_of_bounds, 0) \ SANITIZER_CHECK(SubOverflow, sub_overflow, 0) \ SANITIZER_CHECK(TypeMismatch, type_mismatch, 1) \ - SANITIZER_CHECK(AlignmentAssumption, alignment_assumption, 0) \ SANITIZER_CHECK(VLABoundNotPositive, vla_bound_not_positive, 0) enum SanitizerHandler { @@ -2634,6 +2633,12 @@ public: ComplexPairTy EmitComplexPrePostIncDec(const UnaryOperator *E, LValue LV, bool isInc, bool isPre); + void EmitAlignmentAssumption(llvm::Value *PtrValue, unsigned Alignment, + llvm::Value *OffsetValue = nullptr) { + Builder.CreateAlignmentAssumption(CGM.getDataLayout(), PtrValue, Alignment, + OffsetValue); + } + /// Converts Location to a DebugLoc, if debug information is enabled. llvm::DebugLoc SourceLocToDebugLoc(SourceLocation Location); @@ -2797,27 +2802,11 @@ public: PeepholeProtection protectFromPeepholes(RValue rvalue); void unprotectFromPeepholes(PeepholeProtection protection); - void EmitAlignmentAssumptionCheck(llvm::Value *Ptr, QualType Ty, - SourceLocation Loc, - SourceLocation AssumptionLoc, - llvm::Value *Alignment, - llvm::Value *OffsetValue, - llvm::Value *TheCheck, - llvm::Instruction *Assumption); - - void EmitAlignmentAssumption(llvm::Value *PtrValue, QualType Ty, - SourceLocation Loc, SourceLocation AssumptionLoc, - llvm::Value *Alignment, - llvm::Value *OffsetValue = nullptr); - - void EmitAlignmentAssumption(llvm::Value *PtrValue, QualType Ty, - SourceLocation Loc, SourceLocation AssumptionLoc, - unsigned Alignment, - llvm::Value *OffsetValue = nullptr); - - void EmitAlignmentAssumption(llvm::Value *PtrValue, const Expr *E, - SourceLocation AssumptionLoc, unsigned Alignment, - llvm::Value *OffsetValue = nullptr); + void EmitAlignmentAssumption(llvm::Value *PtrValue, llvm::Value *Alignment, + llvm::Value *OffsetValue = nullptr) { + Builder.CreateAlignmentAssumption(CGM.getDataLayout(), PtrValue, Alignment, + OffsetValue); + } //===--------------------------------------------------------------------===// // Statement Emission |