diff options
author | Chris Lattner <sabre@nondot.org> | 2005-07-12 02:36:10 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-07-12 02:36:10 +0000 |
commit | 351817b1f9d0563ff573555eed6352aaebc77b29 (patch) | |
tree | a7645b4c73e0290e6dd748c45a2af04d800a8836 /llvm | |
parent | f873f4d504acd90e49222f4eff2db19b1216ddfa (diff) | |
download | bcm5719-llvm-351817b1f9d0563ff573555eed6352aaebc77b29.tar.gz bcm5719-llvm-351817b1f9d0563ff573555eed6352aaebc77b29.zip |
Minor changes to improve comments and fix the build on _WIN32 systems.
llvm-svn: 22391
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/Target/X86/X86Subtarget.cpp | 10 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86Subtarget.h | 15 |
2 files changed, 13 insertions, 12 deletions
diff --git a/llvm/lib/Target/X86/X86Subtarget.cpp b/llvm/lib/Target/X86/X86Subtarget.cpp index e50d2d6d87b..1c161562c37 100644 --- a/llvm/lib/Target/X86/X86Subtarget.cpp +++ b/llvm/lib/Target/X86/X86Subtarget.cpp @@ -21,7 +21,7 @@ X86Subtarget::X86Subtarget(const Module &M) 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 @@ X86Subtarget::X86Subtarget(const Module &M) #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) { } } diff --git a/llvm/lib/Target/X86/X86Subtarget.h b/llvm/lib/Target/X86/X86Subtarget.h index 96a1bb2cc0b..a67925eced7 100644 --- a/llvm/lib/Target/X86/X86Subtarget.h +++ b/llvm/lib/Target/X86/X86Subtarget.h @@ -21,7 +21,8 @@ class Module; 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 @@ public: /// 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 |