[llvm] r226077 - Win64Exception.cpp: Try to fix crash for x64 EH. "Per" might be null there.

NAKAMURA Takumi geek4civic at gmail.com
Wed Jan 14 18:15:21 PST 2015


Author: chapuni
Date: Wed Jan 14 20:15:21 2015
New Revision: 226077

URL: http://llvm.org/viewvc/llvm-project?rev=226077&view=rev
Log:
Win64Exception.cpp: Try to fix crash for x64 EH. "Per" might be null there.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/Win64Exception.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/Win64Exception.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/Win64Exception.cpp?rev=226077&r1=226076&r2=226077&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/Win64Exception.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/Win64Exception.cpp Wed Jan 14 20:15:21 2015
@@ -106,7 +106,7 @@ void Win64Exception::endFunction(const M
     // Emit the tables appropriate to the personality function in use. If we
     // don't recognize the personality, assume it uses an Itanium-style LSDA.
     const Function *Per = MMI->getPersonality();
-    if (Per->getName() == "__C_specific_handler")
+    if (Per && Per->getName() == "__C_specific_handler")
       emitCSpecificHandlerTable();
     else
       emitExceptionTable();





More information about the llvm-commits mailing list