Temporarily backing out 56585:56589 to unbreak the build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56607 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/ARM/ARMTargetAsmInfo.cpp b/lib/Target/ARM/ARMTargetAsmInfo.cpp
index 81bec51..7afbab3 100644
--- a/lib/Target/ARM/ARMTargetAsmInfo.cpp
+++ b/lib/Target/ARM/ARMTargetAsmInfo.cpp
@@ -17,7 +17,7 @@
 #include <cctype>
 using namespace llvm;
 
-const char *const llvm::arm_asm_table[] = {
+static const char *const arm_asm_table[] = {
                                       "{r0}", "r0",
                                       "{r1}", "r1",
                                       "{r2}", "r2",
@@ -42,10 +42,21 @@
                                       "{cc}", "cc",
                                       0,0};
 
-TEMPLATE_INSTANTIATION(class ARMTargetAsmInfo<TargetAsmInfo>);
+ARMTargetAsmInfo::ARMTargetAsmInfo(const ARMTargetMachine &TM) {
+  AsmTransCBE = arm_asm_table;
+
+  AlignmentIsInBytes = false;
+  Data64bitsDirective = 0;
+  CommentString = "@";
+  ConstantPoolSection = "\t.text\n";
+  COMMDirectiveTakesAlignment = false;
+  InlineAsmStart = "@ InlineAsm Start";
+  InlineAsmEnd = "@ InlineAsm End";
+  LCOMMDirective = "\t.lcomm\t";
+}
 
 ARMDarwinTargetAsmInfo::ARMDarwinTargetAsmInfo(const ARMTargetMachine &TM):
-  ARMTargetAsmInfo<DarwinTargetAsmInfo>(TM) {
+  ARMTargetAsmInfo(TM), DarwinTargetAsmInfo(TM) {
   Subtarget = &DTM->getSubtarget<ARMSubtarget>();
 
   GlobalPrefix = "_";
@@ -93,7 +104,7 @@
 }
 
 ARMELFTargetAsmInfo::ARMELFTargetAsmInfo(const ARMTargetMachine &TM):
-  ARMTargetAsmInfo<ELFTargetAsmInfo>(TM) {
+  ARMTargetAsmInfo(TM), ELFTargetAsmInfo(TM) {
   Subtarget = &ETM->getSubtarget<ARMSubtarget>();
 
   NeedsSet = false;
@@ -127,15 +138,13 @@
 
 /// Count the number of comma-separated arguments.
 /// Do not try to detect errors.
-template <class BaseTAI>
-unsigned ARMTargetAsmInfo<BaseTAI>::countArguments(const char* p) const {
+unsigned ARMTargetAsmInfo::countArguments(const char* p) const {
   unsigned count = 0;
   while (*p && isspace(*p) && *p != '\n')
     p++;
   count++;
-  while (*p && *p!='\n' &&
-         strncmp(p, BaseTAI::CommentString,
-                 strlen(BaseTAI::CommentString))!=0) {
+  while (*p && *p!='\n' && 
+         strncmp(p, CommentString, strlen(CommentString))!=0) {
     if (*p==',')
       count++;
     p++;
@@ -145,8 +154,7 @@
 
 /// Count the length of a string enclosed in quote characters.
 /// Do not try to detect errors.
-template <class BaseTAI>
-unsigned ARMTargetAsmInfo<BaseTAI>::countString(const char* p) const {
+unsigned ARMTargetAsmInfo::countString(const char* p) const {
   unsigned count = 0;
   while (*p && isspace(*p) && *p!='\n')
     p++;
@@ -158,8 +166,7 @@
 }
 
 /// ARM-specific version of TargetAsmInfo::getInlineAsmLength.
-template <class BaseTAI>
-unsigned ARMTargetAsmInfo<BaseTAI>::getInlineAsmLength(const char *s) const {
+unsigned ARMTargetAsmInfo::getInlineAsmLength(const char *s) const {
   // Make a lowercase-folded version of s for counting purposes.
   char *q, *s_copy = (char *)malloc(strlen(s) + 1);
   strcpy(s_copy, s);
@@ -185,7 +192,7 @@
           break;
         }
       // Ignore everything from comment char(s) to EOL
-      if (strncmp(Str, BaseTAI::CommentString, strlen(BaseTAI::CommentString))==-0)
+      if (strncmp(Str, CommentString, strlen(CommentString))==-0)
         atInsnStart = false;
       // FIXME do something like the following for non-Darwin
       else if (*Str == '.' && Subtarget->isTargetDarwin()) {
@@ -275,7 +282,7 @@
           Length += 4;    // ARM
       }
     }
-    if (*Str == '\n' || *Str == BaseTAI::SeparatorChar)
+    if (*Str == '\n' || *Str == SeparatorChar)
       atInsnStart = true;
   }
   free(s_copy);