[llvm-commits] CVS: llvm/lib/Target/X86/X86Subtarget.cpp X86Subtarget.h

Chris Lattner lattner at cs.uiuc.edu
Mon Jul 11 19:36:21 PDT 2005



Changes in directory llvm/lib/Target/X86:

X86Subtarget.cpp updated: 1.1 -> 1.2
X86Subtarget.h updated: 1.1 -> 1.2
---
Log message:

Minor changes to improve comments and fix the build on _WIN32 systems.


---
Diffs of the changes:  (+13 -12)

 X86Subtarget.cpp |   10 ++++------
 X86Subtarget.h   |   15 +++++++++------
 2 files changed, 13 insertions(+), 12 deletions(-)


Index: llvm/lib/Target/X86/X86Subtarget.cpp
diff -u llvm/lib/Target/X86/X86Subtarget.cpp:1.1 llvm/lib/Target/X86/X86Subtarget.cpp:1.2
--- llvm/lib/Target/X86/X86Subtarget.cpp:1.1	Mon Jul 11 20:41:54 2005
+++ llvm/lib/Target/X86/X86Subtarget.cpp	Mon Jul 11 21:36:10 2005
@@ -21,7 +21,7 @@
     asmLeadingUnderscore(false), asmAlignmentIsInBytes(false),
     asmPrintDotLocalConstants(false), asmPrintDotLCommConstants(false),
     asmPrintConstantAlignment(false) {
-  // Declare a boolean for each platform
+  // Declare a boolean for each major platform.
   bool forCygwin = false;
   bool forDarwin = false;
   bool forWindows = false;
@@ -40,20 +40,18 @@
 #elif defined(__APPLE__)
     forDarwin = true;
 #elif defined(_WIN32)
-    forWindws = true;
+    forWindows = true;
 #endif
   }
 
   if (forCygwin) {
     asmLeadingUnderscore = true;
-  }
-  if (forDarwin) {
+  } else if (forDarwin) {
     stackAlignment = 16;
     indirectExternAndWeakGlobals = true;
     asmDarwinLinkerStubs = true;
     asmLeadingUnderscore = true;
     asmPrintDotLCommConstants = true;
-  }
-  if (forWindows) {
+  } else if (forWindows) {
   }
 }


Index: llvm/lib/Target/X86/X86Subtarget.h
diff -u llvm/lib/Target/X86/X86Subtarget.h:1.1 llvm/lib/Target/X86/X86Subtarget.h:1.2
--- llvm/lib/Target/X86/X86Subtarget.h:1.1	Mon Jul 11 20:41:54 2005
+++ llvm/lib/Target/X86/X86Subtarget.h	Mon Jul 11 21:36:10 2005
@@ -21,7 +21,8 @@
 
 class X86Subtarget : public TargetSubtarget {
 protected:
-  /// Used by the target machine to set up the target frame info
+  /// stackAlignment - The minimum alignment known to hold of the stack frame on
+  /// entry to the function and which must be maintained by every function.
   unsigned stackAlignment;
   
   /// Used by instruction selector
@@ -39,16 +40,18 @@
   /// of the specified module.
   ///
   X86Subtarget(const Module &M);
-  
-  /// Returns the preferred stack alignment for the current target triple, or
-  /// the default if no target triple is set.
+
+  /// getStackAlignment - Returns the minimum alignment known to hold of the
+  /// stack frame on entry to the function and which must be maintained by every
+  /// function for this subtarget.
   unsigned getStackAlignment() const { return stackAlignment; }
   
   /// Returns true if the instruction selector should treat global values
   /// referencing external or weak symbols as indirect rather than direct 
   /// references.
-  bool getIndirectExternAndWeakGlobals() const { 
-    return indirectExternAndWeakGlobals; }
+  bool getIndirectExternAndWeakGlobals() const {
+    return indirectExternAndWeakGlobals;
+  }
 };
 } // End llvm namespace
 






More information about the llvm-commits mailing list