[llvm-commits] [llvm] r131120 - /llvm/trunk/lib/MC/MCDwarf.cpp

Rafael Espindola rafael.espindola at gmail.com
Mon May 9 20:26:21 PDT 2011


Author: rafael
Date: Mon May  9 22:26:21 2011
New Revision: 131120

URL: http://llvm.org/viewvc/llvm-project?rev=131120&view=rev
Log:
Small cleanups.

Modified:
    llvm/trunk/lib/MC/MCDwarf.cpp

Modified: llvm/trunk/lib/MC/MCDwarf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDwarf.cpp?rev=131120&r1=131119&r2=131120&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCDwarf.cpp (original)
+++ llvm/trunk/lib/MC/MCDwarf.cpp Mon May  9 22:26:21 2011
@@ -629,8 +629,6 @@
                                           unsigned lsdaEncoding) {
   MCContext &context = streamer.getContext();
   const TargetAsmInfo &asmInfo = context.getTargetAsmInfo();
-  const MCSection &section = *asmInfo.getEHFrameSection();
-  streamer.SwitchSection(&section);
 
   MCSymbol *sectionStart;
   if (asmInfo.isFunctionEHFrameSymbolPrivate())
@@ -683,9 +681,8 @@
     // Personality
     augmentationLength += getSizeForEncoding(streamer, personalityEncoding);
   }
-  if (lsda) {
+  if (lsda)
     augmentationLength += 1;
-  }
   // Encoding of the FDE pointers
   augmentationLength += 1;
 
@@ -698,10 +695,8 @@
     // Personality
     EmitPersonality(streamer, *personality, personalityEncoding);
   }
-  if (lsda) {
-    // LSDA Encoding
-    streamer.EmitIntValue(lsdaEncoding, 1);
-  }
+  if (lsda)
+    streamer.EmitIntValue(lsdaEncoding, 1); // LSDA Encoding
   // Encoding of the FDE pointers
   streamer.EmitIntValue(asmInfo.getFDEEncoding(UsingCFI), 1);
 
@@ -831,6 +826,8 @@
                                bool usingCFI) {
   const MCContext &context = streamer.getContext();
   const TargetAsmInfo &asmInfo = context.getTargetAsmInfo();
+  const MCSection &section = *asmInfo.getEHFrameSection();
+  streamer.SwitchSection(&section);
 
   MCSymbol *fdeEnd = NULL;
   DenseMap<CIEKey, const MCSymbol*> CIEStarts;





More information about the llvm-commits mailing list