[llvm-commits] [llvm] r122443 - in /llvm/trunk: include/llvm/MC/MCAsmInfo.h lib/MC/MCAsmInfo.cpp lib/MC/MCAsmInfoDarwin.cpp lib/MC/MCStreamer.cpp

Rafael Espindola rafael.espindola at gmail.com
Wed Dec 22 13:51:29 PST 2010


Author: rafael
Date: Wed Dec 22 15:51:29 2010
New Revision: 122443

URL: http://llvm.org/viewvc/llvm-project?rev=122443&view=rev
Log:
Rename NeedsSetToChangeDiffSize to HasAggressiveSymbolFolding which is a much
better name and matches what is used in the MachO writer.

Modified:
    llvm/trunk/include/llvm/MC/MCAsmInfo.h
    llvm/trunk/lib/MC/MCAsmInfo.cpp
    llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp
    llvm/trunk/lib/MC/MCStreamer.cpp

Modified: llvm/trunk/include/llvm/MC/MCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAsmInfo.h?rev=122443&r1=122442&r2=122443&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCAsmInfo.h (original)
+++ llvm/trunk/include/llvm/MC/MCAsmInfo.h Wed Dec 22 15:51:29 2010
@@ -197,12 +197,12 @@
     /// HasSetDirective - True if the assembler supports the .set directive.
     bool HasSetDirective;                    // Defaults to true.
 
-    /// NeedsSetToChangeDiffSize - True if the assembler requires that we do
+    /// HasAggressiveSymbolFolding - False if the assembler requires that we use
     /// Lc = a - b
     /// .long Lc
-    /// instead of doing
+    /// instead of
     /// .long a - b
-    bool NeedsSetToChangeDiffSize;           // Defaults to false.
+    bool HasAggressiveSymbolFolding;           // Defaults to true.
 
     /// HasLCOMMDirective - This is true if the target supports the .lcomm
     /// directive.
@@ -407,7 +407,9 @@
       return ExternDirective;
     }
     bool hasSetDirective() const { return HasSetDirective; }
-    bool needsSetToChangeDiffSize() const { return NeedsSetToChangeDiffSize; }
+    bool hasAggressiveSymbolFolding() const {
+      return HasAggressiveSymbolFolding;
+    }
     bool hasLCOMMDirective() const { return HasLCOMMDirective; }
     bool hasDotTypeDotSizeDirective() const {return HasDotTypeDotSizeDirective;}
     bool getCOMMDirectiveAlignmentIsInBytes() const {

Modified: llvm/trunk/lib/MC/MCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfo.cpp?rev=122443&r1=122442&r2=122443&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmInfo.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmInfo.cpp Wed Dec 22 15:51:29 2010
@@ -54,7 +54,7 @@
   GPRel32Directive = 0;
   GlobalDirective = "\t.globl\t";
   HasSetDirective = true;
-  NeedsSetToChangeDiffSize = false;
+  HasAggressiveSymbolFolding = true;
   HasLCOMMDirective = false;
   COMMDirectiveAlignmentIsInBytes = true;
   HasDotTypeDotSizeDirective = true;

Modified: llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp?rev=122443&r1=122442&r2=122443&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp Wed Dec 22 15:51:29 2010
@@ -41,7 +41,9 @@
   // FIXME: Darwin 10 and newer don't need this.
   LinkerRequiresNonEmptyDwarfLines = true;
 
-  NeedsSetToChangeDiffSize = true;
+  // FIXME: Change this once MC is the system assembler.
+  HasAggressiveSymbolFolding = false;
+
   HiddenVisibilityAttr = MCSA_PrivateExtern;
   // Doesn't support protected visibility.
   ProtectedVisibilityAttr = MCSA_Global;

Modified: llvm/trunk/lib/MC/MCStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCStreamer.cpp?rev=122443&r1=122442&r2=122443&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCStreamer.cpp Wed Dec 22 15:51:29 2010
@@ -77,7 +77,7 @@
 
 void MCStreamer::EmitAbsValue(const MCExpr *Value, unsigned Size,
                               unsigned AddrSpace) {
-  if (!getContext().getAsmInfo().needsSetToChangeDiffSize()) {
+  if (getContext().getAsmInfo().hasAggressiveSymbolFolding()) {
     EmitValue(Value, Size, AddrSpace);
     return;
   }





More information about the llvm-commits mailing list