[Unroll] Fix a bug in UnrolledInstAnalyzer::visitLoad.
[oota-llvm.git] / lib / MC / MCContext.cpp
index e8fb6a95ebe04896fce4898e5614c0b2b15fe526..9149f89504083e5adab541ab4d201e154a92220e 100644 (file)
@@ -23,6 +23,7 @@
 #include "llvm/MC/MCSymbolCOFF.h"
 #include "llvm/MC/MCSymbolELF.h"
 #include "llvm/MC/MCSymbolMachO.h"
+#include "llvm/Support/COFF.h"
 #include "llvm/Support/ELF.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/FileSystem.h"
@@ -162,15 +163,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,