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;
#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;
}
}
/// 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