aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-11 22:14:59 +0000
committerChris Lattner <sabre@nondot.org>2009-08-11 22:14:59 +0000
commit5f28ffe6c25a8dea55aee425648e4942c04e4f3f (patch)
tree2f28b81fc4ec8d7dc34496b08cc93714b6301b32 /lib/Target
parent4b152796cef7ff7140fd665a49d0ca41cfd73818 (diff)
downloadexternal_llvm-5f28ffe6c25a8dea55aee425648e4942c04e4f3f.zip
external_llvm-5f28ffe6c25a8dea55aee425648e4942c04e4f3f.tar.gz
external_llvm-5f28ffe6c25a8dea55aee425648e4942c04e4f3f.tar.bz2
eliminate template from arm TAI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78729 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/ARM/ARMTargetAsmInfo.cpp22
-rw-r--r--lib/Target/ARM/ARMTargetAsmInfo.h24
-rw-r--r--lib/Target/X86/X86TargetAsmInfo.h1
3 files changed, 19 insertions, 28 deletions
diff --git a/lib/Target/ARM/ARMTargetAsmInfo.cpp b/lib/Target/ARM/ARMTargetAsmInfo.cpp
index 755ee15..464ed1f 100644
--- a/lib/Target/ARM/ARMTargetAsmInfo.cpp
+++ b/lib/Target/ARM/ARMTargetAsmInfo.cpp
@@ -14,7 +14,7 @@
#include "ARMTargetAsmInfo.h"
using namespace llvm;
-const char *const llvm::arm_asm_table[] = {
+static const char *const arm_asm_table[] = {
"{r0}", "r0",
"{r1}", "r1",
"{r2}", "r2",
@@ -41,6 +41,15 @@ const char *const llvm::arm_asm_table[] = {
};
ARMDarwinTargetAsmInfo::ARMDarwinTargetAsmInfo() {
+ AsmTransCBE = arm_asm_table;
+ AlignmentIsInBytes = false;
+ Data64bitsDirective = 0;
+ CommentString = "@";
+ COMMDirectiveTakesAlignment = false;
+ InlineAsmStart = "@ InlineAsm Start";
+ InlineAsmEnd = "@ InlineAsm End";
+
+
ZeroDirective = "\t.space\t";
ZeroFillDirective = "\t.zerofill\t"; // Uses .zerofill
SetDirective = "\t.set\t";
@@ -56,6 +65,13 @@ ARMDarwinTargetAsmInfo::ARMDarwinTargetAsmInfo() {
}
ARMELFTargetAsmInfo::ARMELFTargetAsmInfo() {
+ AlignmentIsInBytes = false;
+ Data64bitsDirective = 0;
+ CommentString = "@";
+ COMMDirectiveTakesAlignment = false;
+ InlineAsmStart = "@ InlineAsm Start";
+ InlineAsmEnd = "@ InlineAsm End";
+
NeedsSet = false;
HasLEB128 = true;
AbsoluteDebugSectionOffsets = true;
@@ -68,7 +84,3 @@ ARMELFTargetAsmInfo::ARMELFTargetAsmInfo() {
SupportsDebugInformation = true;
}
-
-// Instantiate default implementation.
-TEMPLATE_INSTANTIATION(class ARMTargetAsmInfo<DarwinTargetAsmInfo>);
-TEMPLATE_INSTANTIATION(class ARMTargetAsmInfo<TargetAsmInfo>);
diff --git a/lib/Target/ARM/ARMTargetAsmInfo.h b/lib/Target/ARM/ARMTargetAsmInfo.h
index d897d8c..3fde8ba 100644
--- a/lib/Target/ARM/ARMTargetAsmInfo.h
+++ b/lib/Target/ARM/ARMTargetAsmInfo.h
@@ -15,34 +15,14 @@
#define LLVM_ARMTARGETASMINFO_H
#include "llvm/Target/DarwinTargetAsmInfo.h"
-#include "llvm/Support/Compiler.h"
namespace llvm {
- extern const char *const arm_asm_table[];
-
- template <class BaseTAI>
- struct ARMTargetAsmInfo : public BaseTAI {
- explicit ARMTargetAsmInfo() {
- BaseTAI::AsmTransCBE = arm_asm_table;
-
- BaseTAI::AlignmentIsInBytes = false;
- BaseTAI::Data64bitsDirective = 0;
- BaseTAI::CommentString = "@";
- BaseTAI::COMMDirectiveTakesAlignment = false;
- BaseTAI::InlineAsmStart = "@ InlineAsm Start";
- BaseTAI::InlineAsmEnd = "@ InlineAsm End";
- }
- };
-
- EXTERN_TEMPLATE_INSTANTIATION(class ARMTargetAsmInfo<DarwinTargetAsmInfo>);
- EXTERN_TEMPLATE_INSTANTIATION(class ARMTargetAsmInfo<TargetAsmInfo>);
-
- struct ARMDarwinTargetAsmInfo : public ARMTargetAsmInfo<DarwinTargetAsmInfo> {
+ struct ARMDarwinTargetAsmInfo : public DarwinTargetAsmInfo {
explicit ARMDarwinTargetAsmInfo();
};
- struct ARMELFTargetAsmInfo : public ARMTargetAsmInfo<TargetAsmInfo> {
+ struct ARMELFTargetAsmInfo : public TargetAsmInfo {
explicit ARMELFTargetAsmInfo();
};
diff --git a/lib/Target/X86/X86TargetAsmInfo.h b/lib/Target/X86/X86TargetAsmInfo.h
index c8167a3..8879b4b 100644
--- a/lib/Target/X86/X86TargetAsmInfo.h
+++ b/lib/Target/X86/X86TargetAsmInfo.h
@@ -18,7 +18,6 @@
#include "llvm/Target/TargetAsmInfo.h"
#include "llvm/Target/COFFTargetAsmInfo.h"
#include "llvm/Target/DarwinTargetAsmInfo.h"
-#include "llvm/Support/Compiler.h"
namespace llvm {