Skip to content

Commit a58f9be

Browse files
committed
Rebase cleanup
1 parent 48785f0 commit a58f9be

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

clang/lib/CodeGen/CGClass.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2805,8 +2805,6 @@ SanitizerInfoFromCFICheckKind(CodeGenFunction::CFITypeCheckKind TCK) {
28052805
case CodeGenFunction::CFITCK_VMFCall:
28062806
llvm_unreachable("unexpected sanitizer kind");
28072807
}
2808-
2809-
return std::make_pair(M, SSK);
28102808
}
28112809

28122810
void CodeGenFunction::EmitVTablePtrCheckForCall(const CXXRecordDecl *RD,
@@ -2816,7 +2814,7 @@ void CodeGenFunction::EmitVTablePtrCheckForCall(const CXXRecordDecl *RD,
28162814
if (!SanOpts.has(SanitizerKind::CFICastStrict))
28172815
RD = LeastDerivedClassWithSameLayout(RD);
28182816

2819-
auto [Ordinal, SSK] = ParseCFITypeCheckKind(TCK);
2817+
auto [Ordinal, SSK] = SanitizerInfoFromCFICheckKind(TCK);
28202818
ApplyDebugLocation ApplyTrapDI(*this, SanitizerAnnotateDebugInfo(Ordinal));
28212819

28222820
EmitVTablePtrCheck(RD, VTable, TCK, Loc);
@@ -2841,7 +2839,7 @@ void CodeGenFunction::EmitVTablePtrCheckForCast(QualType T, Address Derived,
28412839
if (!SanOpts.has(SanitizerKind::CFICastStrict))
28422840
ClassDecl = LeastDerivedClassWithSameLayout(ClassDecl);
28432841

2844-
auto [Ordinal, SSK] = ParseCFITypeCheckKind(TCK);
2842+
auto [Ordinal, SSK] = SanitizerInfoFromCFICheckKind(TCK);
28452843
ApplyDebugLocation ApplyTrapDI(*this, SanitizerAnnotateDebugInfo(Ordinal));
28462844

28472845
llvm::BasicBlock *ContBlock = nullptr;

clang/lib/CodeGen/CodeGenFunction.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3353,11 +3353,6 @@ class CodeGenFunction : public CodeGenTypeCache {
33533353
SanitizerSet SkippedChecks = SanitizerSet(),
33543354
llvm::Value *ArraySize = nullptr);
33553355

3356-
/// Converts the CFITypeCheckKind into SanitizerKind::SanitizerOrdinal and
3357-
/// llvm::SanitizerStatKind.
3358-
static std::pair<SanitizerKind::SanitizerOrdinal, llvm::SanitizerStatKind>
3359-
ParseCFITypeCheckKind(CFITypeCheckKind TCK);
3360-
33613356
/// Emit a check that \p Base points into an array object, which
33623357
/// we can access at index \p Index. \p Accessed should be \c false if we
33633358
/// this expression is used as an lvalue, for instance in "&Arr[Idx]".

0 commit comments

Comments
 (0)