From 635656e23174cea675e9d4352c43143129740b5e Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Thu, 15 Jan 2015 02:15:21 +0000 Subject: [PATCH] Win64Exception.cpp: Try to fix crash for x64 EH. "Per" might be null there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226077 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/Win64Exception.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/AsmPrinter/Win64Exception.cpp b/lib/CodeGen/AsmPrinter/Win64Exception.cpp index 567e0651e34..80edc405ca9 100644 --- a/lib/CodeGen/AsmPrinter/Win64Exception.cpp +++ b/lib/CodeGen/AsmPrinter/Win64Exception.cpp @@ -106,7 +106,7 @@ void Win64Exception::endFunction(const MachineFunction *) { // 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(); -- 2.34.1