diff options
author | Chris Lattner <sabre@nondot.org> | 2005-11-21 22:43:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-11-21 22:43:58 +0000 |
commit | d460f57d65ce7d1d0db6f0183d31eae1ecdb8788 (patch) | |
tree | 67e248682543dacc988c76a7198e58d79349b1bf /lib/Target/X86/X86Subtarget.cpp | |
parent | a35a8e87fa8294402b1015e0e5049f6869dcc653 (diff) |
Simplify the subtarget info, allow the asmwriter to do some target sensing
based on TargetType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24478 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86Subtarget.cpp')
-rw-r--r-- | lib/Target/X86/X86Subtarget.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp index b05e674ff0..80f12b008c 100644 --- a/lib/Target/X86/X86Subtarget.cpp +++ b/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; } } |