diff options
author | Pavel <operasfantom@gmail.com> | 2022-07-04 01:27:43 +0400 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2022-09-14 20:40:10 +0100 |
commit | d14b7dc335f1dc31a53602cee48f05e415edbfe5 (patch) | |
tree | 54fe78941225d94836d5baf109b98d858ae5734f /runtime | |
parent | f3f4736956bb906e480d7ba50e1836c611f26be7 (diff) | |
download | klee-d14b7dc335f1dc31a53602cee48f05e415edbfe5.tar.gz |
Remove LLVM version < 9
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/Sanitizer/ubsan/ubsan_checks.inc | 9 | ||||
-rw-r--r-- | runtime/Sanitizer/ubsan/ubsan_handlers.cpp | 21 | ||||
-rw-r--r-- | runtime/Sanitizer/ubsan/ubsan_handlers.h | 6 |
3 files changed, 0 insertions, 36 deletions
diff --git a/runtime/Sanitizer/ubsan/ubsan_checks.inc b/runtime/Sanitizer/ubsan/ubsan_checks.inc index c32f7846..a4235e96 100644 --- a/runtime/Sanitizer/ubsan/ubsan_checks.inc +++ b/runtime/Sanitizer/ubsan/ubsan_checks.inc @@ -34,9 +34,7 @@ UBSAN_CHECK(NullptrAfterNonZeroOffset, "nullptr-after-nonzero-offset", #endif UBSAN_CHECK(PointerOverflow, "pointer-overflow", "pointer-overflow") UBSAN_CHECK(MisalignedPointerUse, "misaligned-pointer-use", "alignment") -#if LLVM_VERSION_MAJOR >= 8 UBSAN_CHECK(AlignmentAssumption, "alignment-assumption", "alignment") -#endif UBSAN_CHECK(InsufficientObjectSize, "insufficient-object-size", "object-size") UBSAN_CHECK(SignedIntegerOverflow, "signed-integer-overflow", "signed-integer-overflow") @@ -49,25 +47,18 @@ UBSAN_CHECK(InvalidBuiltin, "invalid-builtin-use", "invalid-builtin-use") #if LLVM_VERSION_MAJOR >= 11 UBSAN_CHECK(InvalidObjCCast, "invalid-objc-cast", "invalid-objc-cast") #endif -#if LLVM_VERSION_MAJOR >= 8 UBSAN_CHECK(ImplicitUnsignedIntegerTruncation, "implicit-unsigned-integer-truncation", "implicit-unsigned-integer-truncation") UBSAN_CHECK(ImplicitSignedIntegerTruncation, "implicit-signed-integer-truncation", "implicit-signed-integer-truncation") -#elif LLVM_VERSION_MAJOR >= 7 -UBSAN_CHECK(ImplicitIntegerTruncation, "implicit-integer-truncation", - "implicit-integer-truncation") -#endif -#if LLVM_VERSION_MAJOR >= 8 UBSAN_CHECK(ImplicitIntegerSignChange, "implicit-integer-sign-change", "implicit-integer-sign-change") UBSAN_CHECK(ImplicitSignedIntegerTruncationOrSignChange, "implicit-signed-integer-truncation-or-sign-change", "implicit-signed-integer-truncation,implicit-integer-sign-change") -#endif UBSAN_CHECK(InvalidShiftBase, "invalid-shift-base", "shift-base") UBSAN_CHECK(InvalidShiftExponent, "invalid-shift-exponent", "shift-exponent") UBSAN_CHECK(OutOfBoundsIndex, "out-of-bounds-index", "bounds") diff --git a/runtime/Sanitizer/ubsan/ubsan_handlers.cpp b/runtime/Sanitizer/ubsan/ubsan_handlers.cpp index 752d47a4..cfb0287c 100644 --- a/runtime/Sanitizer/ubsan/ubsan_handlers.cpp +++ b/runtime/Sanitizer/ubsan/ubsan_handlers.cpp @@ -50,9 +50,7 @@ static const char *get_suffix(ErrorType ET) { #endif case ErrorType::PointerOverflow: case ErrorType::MisalignedPointerUse: -#if LLVM_VERSION_MAJOR >= 8 case ErrorType::AlignmentAssumption: -#endif return "ptr.err"; case ErrorType::InsufficientObjectSize: return "undefined_behavior.err"; @@ -68,19 +66,12 @@ static const char *get_suffix(ErrorType ET) { case ErrorType::InvalidObjCCast: return "undefined_behavior.err"; #endif -#if LLVM_VERSION_MAJOR >= 8 case ErrorType::ImplicitUnsignedIntegerTruncation: case ErrorType::ImplicitSignedIntegerTruncation: return "implicit_conversion.err"; -#elif LLVM_VERSION_MAJOR >= 7 - case ErrorType::ImplicitIntegerTruncation: - return "implicit_conversion.err"; -#endif -#if LLVM_VERSION_MAJOR >= 8 case ErrorType::ImplicitIntegerSignChange: case ErrorType::ImplicitSignedIntegerTruncationOrSignChange: return "implicit_conversion.err"; -#endif case ErrorType::InvalidShiftBase: case ErrorType::InvalidShiftExponent: return "overflow.err"; @@ -194,7 +185,6 @@ extern "C" void __ubsan_handle_type_mismatch_v1_abort(TypeMismatchData *Data, handleTypeMismatchImpl(Data, Pointer); } -#if LLVM_VERSION_MAJOR >= 8 static void handleAlignmentAssumptionImpl(AlignmentAssumptionData * /*Data*/, ValueHandle /*Pointer*/, ValueHandle /*Alignment*/, @@ -215,7 +205,6 @@ extern "C" void __ubsan_handle_alignment_assumption_abort( ValueHandle Offset) { handleAlignmentAssumptionImpl(Data, Pointer, Alignment, Offset); } -#endif /// \brief Common diagnostic emission for various forms of integer overflow. static void handleIntegerOverflowImpl(OverflowData *Data, ValueHandle /*LHS*/, @@ -376,12 +365,10 @@ extern "C" void __ubsan_handle_load_invalid_value_abort(InvalidValueData *Data, handleLoadInvalidValue(Data, Val); } -#if LLVM_VERSION_MAJOR >= 7 static void handleImplicitConversion(ImplicitConversionData *Data, ValueHandle /*Src*/, ValueHandle /*Dst*/) { ErrorType ET = ErrorType::GenericUB; -#if LLVM_VERSION_MAJOR >= 8 const TypeDescriptor &SrcTy = Data->FromType; const TypeDescriptor &DstTy = Data->ToType; @@ -413,13 +400,6 @@ static void handleImplicitConversion(ImplicitConversionData *Data, ET = ErrorType::ImplicitSignedIntegerTruncationOrSignChange; break; } -#else - switch (Data->Kind) { - case ICCK_IntegerTruncation: - ET = ErrorType::ImplicitIntegerTruncation; - break; - } -#endif report_error_type(ET); } @@ -434,7 +414,6 @@ __ubsan_handle_implicit_conversion_abort(ImplicitConversionData *Data, ValueHandle Src, ValueHandle Dst) { handleImplicitConversion(Data, Src, Dst); } -#endif static void handleInvalidBuiltin(InvalidBuiltinData * /*Data*/) { ErrorType ET = ErrorType::InvalidBuiltin; diff --git a/runtime/Sanitizer/ubsan/ubsan_handlers.h b/runtime/Sanitizer/ubsan/ubsan_handlers.h index da111ff6..f6c36fe5 100644 --- a/runtime/Sanitizer/ubsan/ubsan_handlers.h +++ b/runtime/Sanitizer/ubsan/ubsan_handlers.h @@ -25,13 +25,11 @@ struct TypeMismatchData { unsigned char TypeCheckKind; }; -#if LLVM_VERSION_MAJOR >= 8 struct AlignmentAssumptionData { SourceLocation Loc; SourceLocation AssumptionLoc; const TypeDescriptor &Type; }; -#endif struct OverflowData { SourceLocation Loc; @@ -64,7 +62,6 @@ struct InvalidValueData { const TypeDescriptor &Type; }; -#if LLVM_VERSION_MAJOR >= 7 /// Known implicit conversion check kinds. /// Keep in sync with the enum of the same name in CGExprScalar.cpp enum ImplicitConversionCheckKind : unsigned char { @@ -74,16 +71,13 @@ enum ImplicitConversionCheckKind : unsigned char { ICCK_IntegerSignChange = 3, ICCK_SignedIntegerTruncationOrSignChange = 4, }; -#endif -#if LLVM_VERSION_MAJOR >= 7 struct ImplicitConversionData { SourceLocation Loc; const TypeDescriptor &FromType; const TypeDescriptor &ToType; /* ImplicitConversionCheckKind */ unsigned char Kind; }; -#endif struct InvalidBuiltinData { SourceLocation Loc; |