mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-12 14:17:59 +00:00
[bpf] fix stack-use-after-scope
Signed-off-by: Alexei Starovoitov <ast@kernel.org> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292258 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
73275fd4d0
commit
a6fcb69f28
@ -308,13 +308,13 @@ SDValue BPFTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
|
||||
// Likewise ExternalSymbol -> TargetExternalSymbol.
|
||||
if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee)) {
|
||||
auto GV = G->getGlobal();
|
||||
Twine Msg("A call to global function '" + StringRef(GV->getName())
|
||||
+ "' is not supported. "
|
||||
+ (GV->isDeclaration() ?
|
||||
"Only calls to predefined BPF helpers are allowed." :
|
||||
"Please use __attribute__((always_inline) to make sure"
|
||||
" this function is inlined."));
|
||||
fail(CLI.DL, DAG, Msg);
|
||||
fail(CLI.DL, DAG,
|
||||
"A call to global function '" + StringRef(GV->getName())
|
||||
+ "' is not supported. "
|
||||
+ (GV->isDeclaration() ?
|
||||
"Only calls to predefined BPF helpers are allowed." :
|
||||
"Please use __attribute__((always_inline) to make sure"
|
||||
" this function is inlined."));
|
||||
Callee = DAG.getTargetGlobalAddress(G->getGlobal(), CLI.DL, PtrVT,
|
||||
G->getOffset(), 0);
|
||||
} else if (ExternalSymbolSDNode *E = dyn_cast<ExternalSymbolSDNode>(Callee)) {
|
||||
|
Loading…
Reference in New Issue
Block a user