[cfe-commits] r56491 - /cfe/trunk/lib/Basic/Targets.cpp
Daniel Dunbar
daniel at zuster.org
Tue Sep 23 10:37:58 PDT 2008
Author: ddunbar
Date: Tue Sep 23 12:37:57 2008
New Revision: 56491
URL: http://llvm.org/viewvc/llvm-project?rev=56491&view=rev
Log:
Add x86_64 Linux target.
- PR2824
Modified:
cfe/trunk/lib/Basic/Targets.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=56491&r1=56490&r2=56491&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Tue Sep 23 12:37:57 2008
@@ -757,6 +757,20 @@
} // end anonymous namespace
namespace {
+// x86-64 Linux target
+class LinuxX86_64TargetInfo : public X86_64TargetInfo {
+public:
+ LinuxX86_64TargetInfo(const std::string& triple) : X86_64TargetInfo(triple) {
+ }
+ virtual void getTargetDefines(std::vector<char> &Defines) const {
+ X86_64TargetInfo::getTargetDefines(Defines);
+ getLinuxDefines(Defines);
+ Define(Defines, "__USER_LABEL_PREFIX__", "");
+ }
+};
+} // end anonymous namespace
+
+namespace {
// x86-64 Darwin (OS X) target
class DarwinX86_64TargetInfo : public X86_64TargetInfo {
public:
@@ -985,6 +999,8 @@
if (T.find("x86_64-") == 0) {
if (isDarwin)
return new DarwinX86_64TargetInfo(T);
+ if (isLinux)
+ return new LinuxX86_64TargetInfo(T);
return new X86_64TargetInfo(T);
}
More information about the cfe-commits
mailing list