Revert "Centralize the information about which object format we are using."
[oota-llvm.git] / lib / MC / MCContext.cpp
index e8fb6a95ebe04896fce4898e5614c0b2b15fe526..c601c56f3952d1406f24ab1954d989af18758466 100644 (file)
@@ -162,15 +162,13 @@ MCSymbol *MCContext::getOrCreateLSDASymbol(StringRef FuncName) {
 MCSymbol *MCContext::createSymbolImpl(const StringMapEntry<bool> *Name,
                                       bool IsTemporary) {
   if (MOFI) {
-    switch (MOFI->getTargetTriple().getObjectFormat()) {
-    case Triple::COFF:
+    switch (MOFI->getObjectFileType()) {
+    case MCObjectFileInfo::IsCOFF:
       return new (Name, *this) MCSymbolCOFF(Name, IsTemporary);
-    case Triple::ELF:
+    case MCObjectFileInfo::IsELF:
       return new (Name, *this) MCSymbolELF(Name, IsTemporary);
-    case Triple::MachO:
+    case MCObjectFileInfo::IsMachO:
       return new (Name, *this) MCSymbolMachO(Name, IsTemporary);
-    case Triple::UnknownObjectFormat:
-      break;
     }
   }
   return new (Name, *this) MCSymbol(MCSymbol::SymbolKindUnset, Name,