Skip to content

Commit aee9b48

Browse files
committed
[clang] Make the CGPointerAuthInfo parameter to the general CGCallee constructor mandatory.
1 parent 4fb1072 commit aee9b48

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

clang/lib/CodeGen/CGCall.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class CGCallee {
109109
/// Construct a callee. Call this constructor directly when this
110110
/// isn't a direct call.
111111
CGCallee(const CGCalleeInfo &abstractInfo, llvm::Value *functionPtr,
112-
const CGPointerAuthInfo &pointerAuthInfo = /*FIXME*/ CGPointerAuthInfo())
112+
const CGPointerAuthInfo &pointerAuthInfo)
113113
: KindOrFunctionPointer(
114114
SpecialKind(reinterpret_cast<uintptr_t>(functionPtr))) {
115115
OrdinaryInfo.AbstractInfo = abstractInfo;

clang/lib/CodeGen/CGObjCGNU.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2625,7 +2625,8 @@ CGObjCGNU::GenerateMessageSendSuper(CodeGenFunction &CGF,
26252625
llvm::Type::getInt1Ty(VMContext), IsClassMessage))};
26262626
llvm::MDNode *node = llvm::MDNode::get(VMContext, impMD);
26272627

2628-
CGCallee callee(CGCalleeInfo(), imp);
2628+
CGPointerAuthInfo pointerAuth; // TODO
2629+
CGCallee callee(CGCalleeInfo(), imp, pointerAuth);
26292630

26302631
llvm::CallBase *call;
26312632
RValue msgRet = CGF.EmitCall(MSI.CallInfo, callee, Return, ActualArgs, &call);
@@ -2806,7 +2807,8 @@ CGObjCGNU::GenerateMessageSend(CodeGenFunction &CGF,
28062807
imp = EnforceType(Builder, imp, MSI.MessengerType);
28072808

28082809
llvm::CallBase *call;
2809-
CGCallee callee(CGCalleeInfo(), imp);
2810+
CGPointerAuthInfo pointerAuth; // TODO
2811+
CGCallee callee(CGCalleeInfo(), imp, pointerAuth);
28102812
RValue msgRet = CGF.EmitCall(MSI.CallInfo, callee, Return, ActualArgs, &call);
28112813
call->setMetadata(msgSendMDKind, node);
28122814

clang/lib/CodeGen/MicrosoftCXXABI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1977,7 +1977,7 @@ CGCallee MicrosoftCXXABI::getVirtualFunctionPointer(CodeGenFunction &CGF,
19771977
VFunc = Builder.CreateAlignedLoad(Ty, VFuncPtr, CGF.getPointerAlign());
19781978
}
19791979

1980-
CGCallee Callee(GD, VFunc);
1980+
CGCallee Callee(GD, VFunc, /*unsigned*/ CGPointerAuthInfo());
19811981
return Callee;
19821982
}
19831983

@@ -3559,7 +3559,7 @@ CGCallee MicrosoftCXXABI::EmitLoadOfMemberFunctionPointer(
35593559

35603560
FunctionPointer =
35613561
Builder.CreateBitCast(FunctionPointer, FTy->getPointerTo());
3562-
CGCallee Callee(FPT, FunctionPointer);
3562+
CGCallee Callee(FPT, FunctionPointer, /*unsigned*/ CGPointerAuthInfo());
35633563
return Callee;
35643564
}
35653565

0 commit comments

Comments
 (0)