Revert "dwarfgen: Add support for generating the debug_str_offsets section, take 2"

This reverts commit r337933. The build error is fixed but the test now
fails on the darwin buildbots. Investigating...

llvm-svn: 337935
diff --git a/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp b/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
index 7f9f03e..b93b0cc 100644
--- a/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
+++ b/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
@@ -54,36 +54,16 @@
 }
 
 void dwarfgen::DIE::addAttribute(uint16_t A, dwarf::Form Form,
-                                 const MCExpr &Expr) {
-  auto &DG = CU->getGenerator();
-  Die->addValue(DG.getAllocator(), static_cast<dwarf::Attribute>(A), Form,
-                DIEExpr(&Expr));
-}
-
-void dwarfgen::DIE::addAttribute(uint16_t A, dwarf::Form Form,
                                  StringRef String) {
   auto &DG = CU->getGenerator();
-  switch (Form) {
-  case DW_FORM_string:
+  if (Form == DW_FORM_string) {
     Die->addValue(DG.getAllocator(), static_cast<dwarf::Attribute>(A), Form,
                   new (DG.getAllocator())
                       DIEInlineString(String, DG.getAllocator()));
-    break;
-
-  case DW_FORM_strp:
-  case DW_FORM_GNU_str_index:
-  case DW_FORM_strx:
-  case DW_FORM_strx1:
-  case DW_FORM_strx2:
-  case DW_FORM_strx3:
-  case DW_FORM_strx4:
+  } else {
     Die->addValue(
         DG.getAllocator(), static_cast<dwarf::Attribute>(A), Form,
         DIEString(DG.getStringPool().getEntry(*DG.getAsmPrinter(), String)));
-    break;
-
-  default:
-    llvm_unreachable("Unhandled form!");
   }
 }
 
@@ -447,7 +427,6 @@
   Asm->setDwarfVersion(Version);
 
   StringPool = llvm::make_unique<DwarfStringPool>(Allocator, *Asm, StringRef());
-  StringOffsetsStartSym = Asm->createTempSymbol("str_offsets_base");
 
   return Error::success();
 }
@@ -469,12 +448,7 @@
     CU->setLength(CUOffset - 4);
   }
   Abbreviations.Emit(Asm.get(), MOFI->getDwarfAbbrevSection());
-
-  StringPool->emitStringOffsetsTableHeader(*Asm, MOFI->getDwarfStrOffSection(),
-                                           StringOffsetsStartSym);
-  StringPool->emit(*Asm, MOFI->getDwarfStrSection(),
-                   MOFI->getDwarfStrOffSection());
-
+  StringPool->emit(*Asm, MOFI->getDwarfStrSection());
   MS->SwitchSection(MOFI->getDwarfInfoSection());
   for (auto &CU : CompileUnits) {
     uint16_t Version = CU->getVersion();