summaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/X86AsmBackend.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-03-11 01:34:21 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-03-11 01:34:21 +0000
commit23ac7c78e4f009e0baa6d42f4fd0143769fbed4a (patch)
tree311441f445e3012612acf0d908978eff2b9e0a06 /lib/Target/X86/X86AsmBackend.cpp
parent6c27f5e5743481c6a519c60135cf85ac238c150a (diff)
downloadexternal_llvm-23ac7c78e4f009e0baa6d42f4fd0143769fbed4a.zip
external_llvm-23ac7c78e4f009e0baa6d42f4fd0143769fbed4a.tar.gz
external_llvm-23ac7c78e4f009e0baa6d42f4fd0143769fbed4a.tar.bz2
MC: Sketch some TargetAsmBackend hooks we are going to need.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98221 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86AsmBackend.cpp')
-rw-r--r--lib/Target/X86/X86AsmBackend.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/lib/Target/X86/X86AsmBackend.cpp b/lib/Target/X86/X86AsmBackend.cpp
index 2eda7b5..88cc2c7 100644
--- a/lib/Target/X86/X86AsmBackend.cpp
+++ b/lib/Target/X86/X86AsmBackend.cpp
@@ -21,14 +21,34 @@ public:
: TargetAsmBackend(T) {}
};
+class DarwinX86AsmBackend : public X86AsmBackend {
+public:
+ DarwinX86AsmBackend(const Target &T)
+ : X86AsmBackend(T) {}
+
+ virtual bool hasAbsolutizedSet() const { return true; }
+
+ virtual bool hasScatteredSymbols() const { return true; }
+};
+
}
TargetAsmBackend *llvm::createX86_32AsmBackend(const Target &T,
const std::string &TT) {
- return new X86AsmBackend(T);
+ switch (Triple(TT).getOS()) {
+ case Triple::Darwin:
+ return new DarwinX86AsmBackend(T);
+ default:
+ return new X86AsmBackend(T);
+ }
}
TargetAsmBackend *llvm::createX86_64AsmBackend(const Target &T,
const std::string &TT) {
- return new X86AsmBackend(T);
+ switch (Triple(TT).getOS()) {
+ case Triple::Darwin:
+ return new DarwinX86AsmBackend(T);
+ default:
+ return new X86AsmBackend(T);
+ }
}