Skip to content

Commit ff5ffbf

Browse files
committed
Replace manual ApplyDebugLocation annotation with SanitizerDebugLocation
1 parent 637c4a2 commit ff5ffbf

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

clang/lib/CodeGen/CGClass.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2817,9 +2817,8 @@ void CodeGenFunction::EmitVTablePtrCheckForCall(const CXXRecordDecl *RD,
28172817
RD = LeastDerivedClassWithSameLayout(RD);
28182818

28192819
auto [Ordinal, _] = SanitizerInfoFromCFICheckKind(TCK);
2820-
ApplyDebugLocation ApplyTrapDI(
2821-
*this,
2822-
SanitizerAnnotateDebugInfo(Ordinal, SanitizerHandler::CFICheckFail));
2820+
SanitizerDebugLocation SanScope(this, {Ordinal},
2821+
SanitizerHandler::CFICheckFail);
28232822

28242823
EmitVTablePtrCheck(RD, VTable, TCK, Loc);
28252824
}
@@ -2844,9 +2843,8 @@ void CodeGenFunction::EmitVTablePtrCheckForCast(QualType T, Address Derived,
28442843
ClassDecl = LeastDerivedClassWithSameLayout(ClassDecl);
28452844

28462845
auto [Ordinal, _] = SanitizerInfoFromCFICheckKind(TCK);
2847-
ApplyDebugLocation ApplyTrapDI(
2848-
*this,
2849-
SanitizerAnnotateDebugInfo(Ordinal, SanitizerHandler::CFICheckFail));
2846+
SanitizerDebugLocation SanScope(this, {Ordinal},
2847+
SanitizerHandler::CFICheckFail);
28502848

28512849
llvm::BasicBlock *ContBlock = nullptr;
28522850

0 commit comments

Comments
 (0)