[llvm-commits] [llvm] r82258 - in /llvm/tags/Apple/llvmCore-2207.3/lib/CodeGen: AsmPrinter/DwarfWriter.cpp MachineModuleInfo.cpp

Bill Wendling isanbard at gmail.com
Fri Sep 18 12:23:17 PDT 2009


Author: void
Date: Fri Sep 18 14:23:16 2009
New Revision: 82258

URL: http://llvm.org/viewvc/llvm-project?rev=82258&view=rev
Log:
Revert part of patch that was causing miscompilations.

Modified:
    llvm/tags/Apple/llvmCore-2207.3/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
    llvm/tags/Apple/llvmCore-2207.3/lib/CodeGen/MachineModuleInfo.cpp

Modified: llvm/tags/Apple/llvmCore-2207.3/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/tags/Apple/llvmCore-2207.3/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=82258&r1=82257&r2=82258&view=diff

==============================================================================
--- llvm/tags/Apple/llvmCore-2207.3/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/tags/Apple/llvmCore-2207.3/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Fri Sep 18 14:23:16 2009
@@ -3977,7 +3977,7 @@
 
       // If there is a personality and landing pads then point to the language
       // specific data area in the exception table.
-      if (MMI->getPersonalities()[0] != NULL) {
+      if (EHFrameInfo.PersonalityIndex) {
         Asm->EmitULEB128Bytes(4);
         Asm->EOL("Augmentation size");
 

Modified: llvm/tags/Apple/llvmCore-2207.3/lib/CodeGen/MachineModuleInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/tags/Apple/llvmCore-2207.3/lib/CodeGen/MachineModuleInfo.cpp?rev=82258&r1=82257&r2=82258&view=diff

==============================================================================
--- llvm/tags/Apple/llvmCore-2207.3/lib/CodeGen/MachineModuleInfo.cpp (original)
+++ llvm/tags/Apple/llvmCore-2207.3/lib/CodeGen/MachineModuleInfo.cpp Fri Sep 18 14:23:16 2009
@@ -44,7 +44,7 @@
 , CallsUnwindInit(0)
 , DbgInfoAvailable(false)
 {
-  // Always emit some info, by default "no personality" info.
+  // Always emit "no personality" info
   Personalities.push_back(NULL);
 }
 MachineModuleInfo::~MachineModuleInfo() {
@@ -149,12 +149,7 @@
     if (Personalities[i] == Personality)
       return;
   
-  // If this is the first personality we're adding go ahead and add it at the
-  // beginning.
-  if (Personalities[0] == NULL)
-    Personalities[0] = Personality;
-  else
-    Personalities.push_back(Personality);
+  Personalities.push_back(Personality);
 }
 
 /// addCatchTypeInfo - Provide the catch typeinfo for a landing pad.
@@ -278,7 +273,7 @@
 }
 
 /// getPersonalityIndex - Return unique index for current personality
-/// function. NULL/first personality function should always get zero index.
+/// function. NULL personality function should always get zero index.
 unsigned MachineModuleInfo::getPersonalityIndex() const {
   const Function* Personality = NULL;
   
@@ -294,7 +289,8 @@
       return i;
   }
 
-  // This will happen if the current personality function is in the zero index.
+  // This should never happen
+  assert(0 && "Personality function should be set!");
   return 0;
 }
 





More information about the llvm-commits mailing list