From 40f8c8450d995a6c14a995dc6e297d5fdc93bf9e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 21 Nov 2005 22:43:58 +0000 Subject: [PATCH] Simplify the subtarget info, allow the asmwriter to do some target sensing based on TargetType. llvm-svn: 24478 --- llvm/lib/Target/X86/X86Subtarget.cpp | 17 ++--------------- llvm/lib/Target/X86/X86Subtarget.h | 7 ------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/llvm/lib/Target/X86/X86Subtarget.cpp b/llvm/lib/Target/X86/X86Subtarget.cpp index b05e674ff0a8..80f12b008ccc 100644 --- a/llvm/lib/Target/X86/X86Subtarget.cpp +++ b/llvm/lib/Target/X86/X86Subtarget.cpp @@ -16,11 +16,7 @@ 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; } } diff --git a/llvm/lib/Target/X86/X86Subtarget.h b/llvm/lib/Target/X86/X86Subtarget.h index dba2bc6b76e2..22b611bfff0b 100644 --- a/llvm/lib/Target/X86/X86Subtarget.h +++ b/llvm/lib/Target/X86/X86Subtarget.h @@ -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