From: David Majnemer Date: Thu, 18 Jun 2015 18:31:46 +0000 (+0000) Subject: [CodeGen] Don't emit a random reference to the personality function X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6d136d7300c60f31d0a01fee2e524c004c9f4c42;p=oota-llvm.git [CodeGen] Don't emit a random reference to the personality function This should fix issues we've been seeing with Darwin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240036 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index bb6bc75b55e..95da5887658 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -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(); diff --git a/test/CodeGen/X86/personality.ll b/test/CodeGen/X86/personality.ll index afb6b1810e6..53162ebc868 100644 --- a/test/CodeGen/X86/personality.ll +++ b/test/CodeGen/X86/personality.ll @@ -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