Simplify the subtarget info, allow the asmwriter to do some target sensing
authorChris Lattner <sabre@nondot.org>
Mon, 21 Nov 2005 22:43:58 +0000 (22:43 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 21 Nov 2005 22:43:58 +0000 (22:43 +0000)
based on TargetType.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24478 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86Subtarget.cpp
lib/Target/X86/X86Subtarget.h

index b05e674ff0a8c716a09b66fe93e94ee10a3a38cc..80f12b008ccc22141f64ca1cb1e00e1744290b62 100644 (file)
 using namespace llvm;
 
 X86Subtarget::X86Subtarget(const Module &M, const std::string &FS)
-  : TargetSubtarget(), stackAlignment(8),
-    indirectExternAndWeakGlobals(false), asmDarwinLinkerStubs(false),
-    asmLeadingUnderscore(false), asmAlignmentIsInBytes(false),
-    asmPrintDotLocalConstants(false), asmPrintDotLCommConstants(false),
-    asmPrintConstantAlignment(false) {
+  : stackAlignment(8), indirectExternAndWeakGlobals(false) {
       
   // Default to ELF unless otherwise specified.
   TargetType = isELF;
@@ -46,17 +42,8 @@ X86Subtarget::X86Subtarget(const Module &M, const std::string &FS)
 #endif
   }
 
-  switch (TargetType) {
-  case isCygwin:
-    asmLeadingUnderscore = true;
-    break;
-  case isDarwin:
+  if (TargetType == isDarwin) {
     stackAlignment = 16;
     indirectExternAndWeakGlobals = true;
-    asmDarwinLinkerStubs = true;
-    asmLeadingUnderscore = true;
-    asmPrintDotLCommConstants = true;
-    break;
-  default: break;
   }
 }
index dba2bc6b76e242e643707c906bfeba6649bd4cc8..22b611bfff0bf4aac23fced4a209056293520539 100644 (file)
@@ -30,13 +30,6 @@ protected:
   /// Used by instruction selector
   bool indirectExternAndWeakGlobals;
 
-  /// Used by the asm printer
-  bool asmDarwinLinkerStubs;
-  bool asmLeadingUnderscore;
-  bool asmAlignmentIsInBytes;
-  bool asmPrintDotLocalConstants;
-  bool asmPrintDotLCommConstants;
-  bool asmPrintConstantAlignment;
 public:
   enum {
     isELF, isCygwin, isDarwin, isWindows