[llvm] r292258 - [bpf] fix stack-use-after-scope

Alexei Starovoitov via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 17 13:14:00 PST 2017


Author: ast
Date: Tue Jan 17 15:14:00 2017
New Revision: 292258

URL: http://llvm.org/viewvc/llvm-project?rev=292258&view=rev
Log:
[bpf] fix stack-use-after-scope

Signed-off-by: Alexei Starovoitov <ast at kernel.org>

Modified:
    llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp

Modified: llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp?rev=292258&r1=292257&r2=292258&view=diff
==============================================================================
--- llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp Tue Jan 17 15:14:00 2017
@@ -308,13 +308,13 @@ SDValue BPFTargetLowering::LowerCall(Tar
   // 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)) {




More information about the llvm-commits mailing list