Skip to content

Commit 9700cac

Browse files
committed
Add back accidentally removed code.
1 parent 9bd2c95 commit 9700cac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2369,6 +2369,10 @@ static QualType GeneralizeFunctionType(ASTContext &Ctx, QualType Ty) {
23692369
llvm::ConstantInt *CodeGenModule::CreateKCFITypeId(QualType T, StringRef Salt) {
23702370
if (getCodeGenOpts().SanitizeCfiICallGeneralizePointers)
23712371
T = GeneralizeFunctionType(getContext(), T);
2372+
if (auto *FnType = T->getAs<FunctionProtoType>())
2373+
T = getContext().getFunctionType(
2374+
FnType->getReturnType(), FnType->getParamTypes(),
2375+
FnType->getExtProtoInfo().withExceptionSpec(EST_None));
23722376

23732377
std::string OutName;
23742378
llvm::raw_string_ostream Out(OutName);

0 commit comments

Comments
 (0)