Fix FP elimination code to work for Thumb-2 addrmode AddrModeT2_so. This fixes Single...
[oota-llvm.git] / lib / Target / TargetAsmInfo.cpp
index 6a2de6f582a6464fdab056094fa2e19e3f37ef13..08ae2cf13e472beb88505d97d3bf83e49cfb02e0 100644 (file)
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetOptions.h"
 #include "llvm/Support/Dwarf.h"
+#include "llvm/Support/ErrorHandling.h"
 #include <cctype>
 #include <cstring>
-
 using namespace llvm;
 
-void TargetAsmInfo::fillDefaultValues() {
+TargetAsmInfo::TargetAsmInfo(const TargetMachine &tm)
+: TM(tm) {
   BSSSection = "\t.bss";
   BSSSection_ = 0;
   ReadOnlySection = 0;
@@ -42,6 +43,7 @@ void TargetAsmInfo::fillDefaultValues() {
   MaxInstLength = 4;
   PCSymbol = "$";
   SeparatorChar = ';';
+  CommentColumn = 60;
   CommentString = "#";
   GlobalPrefix = "";
   PrivateGlobalPrefix = ".";
@@ -58,6 +60,7 @@ void TargetAsmInfo::fillDefaultValues() {
   InlineAsmEnd = "#NO_APP";
   AssemblerDialect = 0;
   StringConstantPrefix = ".str";
+  AllowQuotesInName = false;
   ZeroDirective = "\t.zero\t";
   ZeroDirectiveSuffix = 0;
   AsciiDirective = "\t.ascii\t";
@@ -102,7 +105,6 @@ void TargetAsmInfo::fillDefaultValues() {
   SupportsExceptionHandling = false;
   DwarfRequiresFrameSection = true;
   DwarfUsesInlineInfoSection = false;
-  SupportsMacInfoSection = true;
   NonLocalEHFrameLabel = false;
   GlobalEHDirective = 0;
   SupportsWeakOmittedEHFrame = true;
@@ -118,7 +120,7 @@ void TargetAsmInfo::fillDefaultValues() {
   DwarfLocSection = ".debug_loc";
   DwarfARangesSection = ".debug_aranges";
   DwarfRangesSection = ".debug_ranges";
-  DwarfMacInfoSection = ".debug_macinfo";
+  DwarfMacroInfoSection = ".debug_macinfo";
   DwarfEHFrameSection = ".eh_frame";
   DwarfExceptionSection = ".gcc_except_table";
   AsmTransCBE = 0;
@@ -126,11 +128,6 @@ void TargetAsmInfo::fillDefaultValues() {
   DataSection = getUnnamedSection("\t.data", SectionFlags::Writeable);
 }
 
-TargetAsmInfo::TargetAsmInfo(const TargetMachine &tm)
-  : TM(tm) {
-  fillDefaultValues();
-}
-
 TargetAsmInfo::~TargetAsmInfo() {
 }
 
@@ -281,7 +278,7 @@ TargetAsmInfo::SectionFlagsForGlobal(const GlobalValue *GV,
       Flags |= SectionFlags::Small;
       break;
      default:
-      assert(0 && "Unexpected section kind!");
+      LLVM_UNREACHABLE("Unexpected section kind!");
     }
 
     if (GV->isWeakForLinker())
@@ -391,7 +388,7 @@ TargetAsmInfo::UniqueSectionForGlobal(const GlobalValue* GV,
    case SectionKind::ThreadBSS:
     return ".gnu.linkonce.tb." + GV->getName();
    default:
-    assert(0 && "Unknown section kind");
+    LLVM_UNREACHABLE("Unknown section kind");
   }
   return NULL;
 }