[llvm] r301746 - [mips][FastISel] Fix a nullptr deference.

Simon Dardis via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 29 09:31:40 PDT 2017


Author: sdardis
Date: Sat Apr 29 11:31:40 2017
New Revision: 301746

URL: http://llvm.org/viewvc/llvm-project?rev=301746&view=rev
Log:
[mips][FastISel] Fix a nullptr deference.

r301392 introduced a potential nullptr deference causing compilation
failures.


Modified:
    llvm/trunk/lib/Target/Mips/MipsFastISel.cpp

Modified: llvm/trunk/lib/Target/Mips/MipsFastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsFastISel.cpp?rev=301746&r1=301745&r2=301746&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsFastISel.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsFastISel.cpp Sat Apr 29 11:31:40 2017
@@ -1263,7 +1263,8 @@ bool MipsFastISel::finishCall(CallLoweri
     MipsCCState CCInfo(CC, false, *FuncInfo.MF, RVLocs, *Context);
 
     CCInfo.AnalyzeCallResult(CLI.Ins, RetCC_Mips, CLI.RetTy,
-                             CLI.Symbol->getName().data());
+                             CLI.Symbol ? CLI.Symbol->getName().data()
+                                        : nullptr);
 
     // Only handle a single return value.
     if (RVLocs.size() != 1)




More information about the llvm-commits mailing list