[llvm] r240036 - [CodeGen] Don't emit a random reference to the personality function

David Majnemer david.majnemer at gmail.com
Thu Jun 18 11:31:47 PDT 2015


Author: majnemer
Date: Thu Jun 18 13:31:46 2015
New Revision: 240036

URL: http://llvm.org/viewvc/llvm-project?rev=240036&view=rev
Log:
[CodeGen] Don't emit a random reference to the personality function

This should fix issues we've been seeing with Darwin.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    llvm/trunk/test/CodeGen/X86/personality.ll

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=240036&r1=240035&r2=240036&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Thu Jun 18 13:31:46 2015
@@ -548,10 +548,6 @@ void AsmPrinter::EmitFunctionHeader() {
   if (F->hasPrefixData())
     EmitGlobalConstant(F->getPrefixData());
 
-  // Emit the personality function.
-  if (F->hasPersonalityFn())
-    EmitGlobalConstant(F->getPersonalityFn());
-
   // Emit the CurrentFnSym.  This is a virtual function to allow targets to
   // do their wild and crazy things as required.
   EmitFunctionEntryLabel();

Modified: llvm/trunk/test/CodeGen/X86/personality.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/personality.ll?rev=240036&r1=240035&r2=240036&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/personality.ll (original)
+++ llvm/trunk/test/CodeGen/X86/personality.ll Thu Jun 18 13:31:46 2015
@@ -41,8 +41,10 @@ declare void @__cxa_end_catch()
 
 declare i32 @__gxx_personality_v0(...)
 
+; X64-NOT: .quad ___gxx_personality_v0
 ; X64: .cfi_personality 155, ___gxx_personality_v0
 
+; X32-NOT: .long ___gxx_personality_v0
 ; X32: .cfi_personality 155, L___gxx_personality_v0$non_lazy_ptr
 
 ; X32:        .section	__IMPORT,__pointers,non_lazy_symbol_pointers





More information about the llvm-commits mailing list