From dbaf0498a9009f38ce7d4ff66df50451b65e50aa Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 14 Aug 2015 15:48:41 +0000 Subject: Revert "Centralize the information about which object format we are using." This reverts commit r245047. It was failing on the darwin bots. The problem was that when running ./bin/llc -march=msp430 llc gets to if (TheTriple.getTriple().empty()) TheTriple.setTriple(sys::getDefaultTargetTriple()); Which means that we go with an arch of msp430 but a triple of x86_64-apple-darwin14.4.0 which fails badly. That code has to be updated to select a triple based on the value of march, but that is not a trivial fix. llvm-svn: 245062 --- llvm/lib/MC/MCContext.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'llvm/lib/MC/MCContext.cpp') diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp index e8fb6a95ebe..c601c56f395 100644 --- a/llvm/lib/MC/MCContext.cpp +++ b/llvm/lib/MC/MCContext.cpp @@ -162,15 +162,13 @@ MCSymbol *MCContext::getOrCreateLSDASymbol(StringRef FuncName) { MCSymbol *MCContext::createSymbolImpl(const StringMapEntry *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, -- cgit v1.2.3