[llvm-commits] [llvm] r80309 - /llvm/trunk/tools/llvm-mc/AsmParser.cpp

Daniel Dunbar daniel at zuster.org
Thu Aug 27 16:58:10 PDT 2009


Author: ddunbar
Date: Thu Aug 27 18:58:10 2009
New Revision: 80309

URL: http://llvm.org/viewvc/llvm-project?rev=80309&view=rev
Log:
Revert r80305, I forgot a dependent change.

--- Reverse-merging r80305 into '.':
U    tools/llvm-mc/AsmParser.cpp

Modified:
    llvm/trunk/tools/llvm-mc/AsmParser.cpp

Modified: llvm/trunk/tools/llvm-mc/AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/AsmParser.cpp?rev=80309&r1=80308&r2=80309&view=diff

==============================================================================
--- llvm/trunk/tools/llvm-mc/AsmParser.cpp (original)
+++ llvm/trunk/tools/llvm-mc/AsmParser.cpp Thu Aug 27 18:58:10 2009
@@ -1287,10 +1287,15 @@
   // If this is the end of the line all that was wanted was to create the
   // the section but with no symbol.
   if (Lexer.is(AsmToken::EndOfStatement)) {
+    // FIXME: CACHE THIS.
+    MCSection *S = 0; //Ctx.GetSection(Section);
+    if (S == 0)
+      S = MCSectionMachO::Create(Segment, Section,
+                                 MCSectionMachO::S_ZEROFILL, 0,
+                                 SectionKind(), Ctx);
+    
     // Create the zerofill section but no symbol
-    Out.EmitZerofill(getMachOSection(Segment, Section,
-                                     MCSectionMachO::S_ZEROFILL, 0,
-                                     SectionKind()));
+    Out.EmitZerofill(S);
     return false;
   }
 
@@ -1343,13 +1348,16 @@
   if (!Sym->isUndefined())
     return Error(IDLoc, "invalid symbol redefinition");
 
-  // Create the zerofill Symbol with Size and Pow2Alignment
-  //
   // FIXME: Arch specific.
-  Out.EmitZerofill(getMachOSection(Segment, Section,
-                                 MCSectionMachO::S_ZEROFILL, 0,
-                                 SectionKind()),
-                   Sym, Size, Pow2Alignment);
+  // FIXME: CACHE.
+  MCSection *S = 0; //Ctx.GetSection(Section);
+  if (S == 0)
+    S = MCSectionMachO::Create(Segment, Section,
+                               MCSectionMachO::S_ZEROFILL, 0,
+                               SectionKind(), Ctx);
+  
+  // Create the zerofill Symbol with Size and Pow2Alignment
+  Out.EmitZerofill(S, Sym, Size, Pow2Alignment);
 
   return false;
 }





More information about the llvm-commits mailing list