aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Fleming <matt@console-pimps.org>2010-05-21 11:39:07 +0000
committerMatt Fleming <matt@console-pimps.org>2010-05-21 11:39:07 +0000
commit7efaef6b822089349b44f15392e0da73a05ebb0a (patch)
tree40cdc22e7390369020cd65c78c518d63b5e8372f
parent924c5e58f2a7c89019000e7dee3391dcebdf8a21 (diff)
downloadexternal_llvm-7efaef6b822089349b44f15392e0da73a05ebb0a.zip
external_llvm-7efaef6b822089349b44f15392e0da73a05ebb0a.tar.gz
external_llvm-7efaef6b822089349b44f15392e0da73a05ebb0a.tar.bz2
Split out the x86_32 an x86_64 ELF backends as they handle ELF
differently. This will make adding ELF support easier in the long run. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104317 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86AsmBackend.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/Target/X86/X86AsmBackend.cpp b/lib/Target/X86/X86AsmBackend.cpp
index bddcad0..72798ab 100644
--- a/lib/Target/X86/X86AsmBackend.cpp
+++ b/lib/Target/X86/X86AsmBackend.cpp
@@ -212,6 +212,18 @@ public:
}
};
+class ELFX86_32AsmBackend : public ELFX86AsmBackend {
+public:
+ ELFX86_32AsmBackend(const Target &T)
+ : ELFX86AsmBackend(T) {}
+};
+
+class ELFX86_64AsmBackend : public ELFX86AsmBackend {
+public:
+ ELFX86_64AsmBackend(const Target &T)
+ : ELFX86AsmBackend(T) {}
+};
+
class DarwinX86AsmBackend : public X86AsmBackend {
public:
DarwinX86AsmBackend(const Target &T)
@@ -291,7 +303,7 @@ TargetAsmBackend *llvm::createX86_32AsmBackend(const Target &T,
case Triple::Darwin:
return new DarwinX86_32AsmBackend(T);
default:
- return new ELFX86AsmBackend(T);
+ return new ELFX86_32AsmBackend(T);
}
}
@@ -301,6 +313,6 @@ TargetAsmBackend *llvm::createX86_64AsmBackend(const Target &T,
case Triple::Darwin:
return new DarwinX86_64AsmBackend(T);
default:
- return new ELFX86AsmBackend(T);
+ return new ELFX86_64AsmBackend(T);
}
}