Skip to content
Snippets Groups Projects
Commit 40f8c845 authored by Chris Lattner's avatar Chris Lattner
Browse files

Simplify the subtarget info, allow the asmwriter to do some target sensing

based on TargetType.

llvm-svn: 24478
parent 99be8f76
No related branches found
No related tags found
No related merge requests found
...@@ -16,11 +16,7 @@ ...@@ -16,11 +16,7 @@
using namespace llvm; using namespace llvm;
X86Subtarget::X86Subtarget(const Module &M, const std::string &FS) X86Subtarget::X86Subtarget(const Module &M, const std::string &FS)
: TargetSubtarget(), stackAlignment(8), : stackAlignment(8), indirectExternAndWeakGlobals(false) {
indirectExternAndWeakGlobals(false), asmDarwinLinkerStubs(false),
asmLeadingUnderscore(false), asmAlignmentIsInBytes(false),
asmPrintDotLocalConstants(false), asmPrintDotLCommConstants(false),
asmPrintConstantAlignment(false) {
// Default to ELF unless otherwise specified. // Default to ELF unless otherwise specified.
TargetType = isELF; TargetType = isELF;
...@@ -46,17 +42,8 @@ X86Subtarget::X86Subtarget(const Module &M, const std::string &FS) ...@@ -46,17 +42,8 @@ X86Subtarget::X86Subtarget(const Module &M, const std::string &FS)
#endif #endif
} }
switch (TargetType) { if (TargetType == isDarwin) {
case isCygwin:
asmLeadingUnderscore = true;
break;
case isDarwin:
stackAlignment = 16; stackAlignment = 16;
indirectExternAndWeakGlobals = true; indirectExternAndWeakGlobals = true;
asmDarwinLinkerStubs = true;
asmLeadingUnderscore = true;
asmPrintDotLCommConstants = true;
break;
default: break;
} }
} }
...@@ -30,13 +30,6 @@ protected: ...@@ -30,13 +30,6 @@ protected:
/// Used by instruction selector /// Used by instruction selector
bool indirectExternAndWeakGlobals; bool indirectExternAndWeakGlobals;
/// Used by the asm printer
bool asmDarwinLinkerStubs;
bool asmLeadingUnderscore;
bool asmAlignmentIsInBytes;
bool asmPrintDotLocalConstants;
bool asmPrintDotLCommConstants;
bool asmPrintConstantAlignment;
public: public:
enum { enum {
isELF, isCygwin, isDarwin, isWindows isELF, isCygwin, isDarwin, isWindows
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment