[llvm-commits] [llvm] r78729 - in /llvm/trunk/lib/Target: ARM/ARMTargetAsmInfo.cpp ARM/ARMTargetAsmInfo.h X86/X86TargetAsmInfo.h

Chris Lattner sabre at nondot.org
Tue Aug 11 15:14:59 PDT 2009


Author: lattner
Date: Tue Aug 11 17:14:59 2009
New Revision: 78729

URL: http://llvm.org/viewvc/llvm-project?rev=78729&view=rev
Log:
eliminate template from arm TAI

Modified:
    llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp
    llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.h
    llvm/trunk/lib/Target/X86/X86TargetAsmInfo.h

Modified: llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp?rev=78729&r1=78728&r2=78729&view=diff

==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp Tue Aug 11 17:14:59 2009
@@ -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 @@
 };
 
 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 @@
 }
 
 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 @@
 
   SupportsDebugInformation = true;
 }
-
-// Instantiate default implementation.
-TEMPLATE_INSTANTIATION(class ARMTargetAsmInfo<DarwinTargetAsmInfo>);
-TEMPLATE_INSTANTIATION(class ARMTargetAsmInfo<TargetAsmInfo>);

Modified: llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.h?rev=78729&r1=78728&r2=78729&view=diff

==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.h (original)
+++ llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.h Tue Aug 11 17:14:59 2009
@@ -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();
   };
 

Modified: llvm/trunk/lib/Target/X86/X86TargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetAsmInfo.h?rev=78729&r1=78728&r2=78729&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetAsmInfo.h (original)
+++ llvm/trunk/lib/Target/X86/X86TargetAsmInfo.h Tue Aug 11 17:14:59 2009
@@ -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 {
 





More information about the llvm-commits mailing list