summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/BPF/BPFISelLowering.cpp
diff options
context:
space:
mode:
authorAlexei Starovoitov <alexei.starovoitov@gmail.com>2017-01-17 21:14:00 +0000
committerAlexei Starovoitov <alexei.starovoitov@gmail.com>2017-01-17 21:14:00 +0000
commitefefbc4a19100c951a00dc0631516bfd93d441f7 (patch)
tree532fcb0c234252128ff30e90ea3186afe365f892 /llvm/lib/Target/BPF/BPFISelLowering.cpp
parent7b97bf233f01d7526e18676cd3be161a310ce657 (diff)
downloadbcm5719-llvm-efefbc4a19100c951a00dc0631516bfd93d441f7.tar.gz
bcm5719-llvm-efefbc4a19100c951a00dc0631516bfd93d441f7.zip
[bpf] fix stack-use-after-scope
Signed-off-by: Alexei Starovoitov <ast@kernel.org> llvm-svn: 292258
Diffstat (limited to 'llvm/lib/Target/BPF/BPFISelLowering.cpp')
-rw-r--r--llvm/lib/Target/BPF/BPFISelLowering.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Target/BPF/BPFISelLowering.cpp b/llvm/lib/Target/BPF/BPFISelLowering.cpp
index b222022f065..b9b3dff95c0 100644
--- a/llvm/lib/Target/BPF/BPFISelLowering.cpp
+++ b/llvm/lib/Target/BPF/BPFISelLowering.cpp
@@ -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)) {
OpenPOWER on IntegriCloud