From: Vlad Tsyrklevich Date: Mon, 22 Oct 2018 21:51:58 +0000 (+0000) Subject: Revert "Ensure sanitizer check function calls have a !dbg location" X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f7319ba47919e226d0d0dfd1d351d3207a44e280;p=clang Revert "Ensure sanitizer check function calls have a !dbg location" This reverts commit r344915. It was causing exceptions on the x86_64-linux-ubsan bot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344961 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 8a8f38678f..55fa455116 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -2867,9 +2867,6 @@ static void emitCheckHandlerCall(CodeGenFunction &CGF, CheckRecoverableKind RecoverKind, bool IsFatal, llvm::BasicBlock *ContBB) { assert(IsFatal || RecoverKind != CheckRecoverableKind::Unrecoverable); - auto *DI = CGF.getDebugInfo(); - SourceLocation Loc = DI ? DI->getLocation() : SourceLocation(); - auto DL = ApplyDebugLocation::CreateDefaultArtificial(CGF, Loc); bool NeedsAbortSuffix = IsFatal && RecoverKind != CheckRecoverableKind::Unrecoverable; bool MinimalRuntime = CGF.CGM.getCodeGenOpts().SanitizeMinimalRuntime; diff --git a/test/CodeGenCXX/ubsan-check-debuglocs.cpp b/test/CodeGenCXX/ubsan-check-debuglocs.cpp deleted file mode 100644 index 96a697aca5..0000000000 --- a/test/CodeGenCXX/ubsan-check-debuglocs.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited \ -// RUN: -fsanitize=null %s -o - | FileCheck %s - -// Check that santizer check calls have a !dbg location. -// CHECK: define {{.*}}acquire{{.*}} !dbg -// CHECK-NOT: define -// CHECK: call void {{.*}}@__ubsan_handle_type_mismatch_v1 -// CHECK-SAME: !dbg - -struct SourceLocation { - SourceLocation acquire() {}; -}; -extern "C" void __ubsan_handle_type_mismatch_v1(SourceLocation *Loc); -static void handleTypeMismatchImpl(SourceLocation *Loc) { Loc->acquire(); } -void __ubsan_handle_type_mismatch_v1(SourceLocation *Loc) { - handleTypeMismatchImpl(Loc); -}