diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-08-14 15:48:41 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-08-14 15:48:41 +0000 |
commit | dbaf0498a9009f38ce7d4ff66df50451b65e50aa (patch) | |
tree | 7237392ad2c82b0360236e79f1bbd68402961d19 /llvm/lib/MC/MCContext.cpp | |
parent | bd481b8f899f9a5eba806ac7b3ca339ca1f94366 (diff) | |
download | bcm5719-llvm-dbaf0498a9009f38ce7d4ff66df50451b65e50aa.tar.gz bcm5719-llvm-dbaf0498a9009f38ce7d4ff66df50451b65e50aa.zip |
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
Diffstat (limited to 'llvm/lib/MC/MCContext.cpp')
-rw-r--r-- | llvm/lib/MC/MCContext.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
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<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, |