summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCParser/AsmParser.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-08-14 15:48:41 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-08-14 15:48:41 +0000
commitdbaf0498a9009f38ce7d4ff66df50451b65e50aa (patch)
tree7237392ad2c82b0360236e79f1bbd68402961d19 /llvm/lib/MC/MCParser/AsmParser.cpp
parentbd481b8f899f9a5eba806ac7b3ca339ca1f94366 (diff)
downloadbcm5719-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/MCParser/AsmParser.cpp')
-rw-r--r--llvm/lib/MC/MCParser/AsmParser.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp
index 0089f8f4ebc..3f45b3d85a3 100644
--- a/llvm/lib/MC/MCParser/AsmParser.cpp
+++ b/llvm/lib/MC/MCParser/AsmParser.cpp
@@ -513,19 +513,17 @@ AsmParser::AsmParser(SourceMgr &SM, MCContext &Ctx, MCStreamer &Out,
Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer());
// Initialize the platform / file format parser.
- switch (Ctx.getObjectFileInfo()->getTargetTriple().getObjectFormat()) {
- case Triple::COFF:
+ switch (Ctx.getObjectFileInfo()->getObjectFileType()) {
+ case MCObjectFileInfo::IsCOFF:
PlatformParser.reset(createCOFFAsmParser());
break;
- case Triple::MachO:
+ case MCObjectFileInfo::IsMachO:
PlatformParser.reset(createDarwinAsmParser());
IsDarwin = true;
break;
- case Triple::ELF:
+ case MCObjectFileInfo::IsELF:
PlatformParser.reset(createELFAsmParser());
break;
- case Triple::UnknownObjectFormat:
- break;
}
PlatformParser->Initialize(*this);
OpenPOWER on IntegriCloud