summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86Subtarget.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-05-05 00:28:39 +0000
committerDan Gohman <gohman@apple.com>2008-05-05 00:28:39 +0000
commitbcde17222280cc15c78903389a7f5a5eee31c0ec (patch)
tree70d0e840cc36f67d375c83802b0409d22547adb2 /llvm/lib/Target/X86/X86Subtarget.cpp
parentde977c0a5c01403a20d9e55d4067cd1f67a6730d (diff)
downloadbcm5719-llvm-bcde17222280cc15c78903389a7f5a5eee31c0ec.tar.gz
bcm5719-llvm-bcde17222280cc15c78903389a7f5a5eee31c0ec.zip
Add AsmPrinter support for emitting a directive to declare that
the code being generated does not require an executable stack. Also, add target-specific code to make use of this on Linux on x86. llvm-svn: 50634
Diffstat (limited to 'llvm/lib/Target/X86/X86Subtarget.cpp')
-rw-r--r--llvm/lib/Target/X86/X86Subtarget.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86Subtarget.cpp b/llvm/lib/Target/X86/X86Subtarget.cpp
index e0f350c5a1c..e555079738f 100644
--- a/llvm/lib/Target/X86/X86Subtarget.cpp
+++ b/llvm/lib/Target/X86/X86Subtarget.cpp
@@ -278,6 +278,8 @@ X86Subtarget::X86Subtarget(const Module &M, const std::string &FS, bool is64Bit)
DarwinVers = atoi(&TT[Pos+7]);
else
DarwinVers = 8; // Minimum supported darwin is Tiger.
+ } else if (TT.find("linux") != std::string::npos) {
+ TargetType = isELFLinux;
} else if (TT.find("cygwin") != std::string::npos) {
TargetType = isCygwin;
} else if (TT.find("mingw") != std::string::npos) {
@@ -302,6 +304,9 @@ X86Subtarget::X86Subtarget(const Module &M, const std::string &FS, bool is64Bit)
#elif defined(_WIN32) || defined(_WIN64)
TargetType = isWindows;
+#elif defined(__linux__)
+ // Linux doesn't imply ELF, but we don't currently support anything else.
+ TargetType = isELFLinux;
#endif
}
OpenPOWER on IntegriCloud