diff options
author | Matthias Braun <matze@braunis.de> | 2017-06-06 20:06:57 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2017-06-06 20:06:57 +0000 |
commit | 7e23fc05c14ec04d6644c1f2d8759d308d77404d (patch) | |
tree | 0b4daaf41ba90f9ed66a3f69cd7cd768b4ad311a /llvm/lib/CodeGen/MIRParser | |
parent | 3b88291581c1d79aeb0b2aca8f55dfc4b4c7460c (diff) | |
download | bcm5719-llvm-7e23fc05c14ec04d6644c1f2d8759d308d77404d.tar.gz bcm5719-llvm-7e23fc05c14ec04d6644c1f2d8759d308d77404d.zip |
llc: Add ability to parse mir from stdin
- Add -x <language> option to switch between IR and MIR inputs.
- Change MIR parser to read from stdin when filename is '-'.
- Add a simple mir roundtrip test.
llvm-svn: 304825
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser')
-rw-r--r-- | llvm/lib/CodeGen/MIRParser/MIRParser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp index cdeba007458..78b57f35778 100644 --- a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp +++ b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp @@ -869,7 +869,7 @@ bool MIRParser::parseMachineFunctions(Module &M, MachineModuleInfo &MMI) { std::unique_ptr<MIRParser> llvm::createMIRParserFromFile(StringRef Filename, SMDiagnostic &Error, LLVMContext &Context) { - auto FileOrErr = MemoryBuffer::getFile(Filename); + auto FileOrErr = MemoryBuffer::getFileOrSTDIN(Filename); if (std::error_code EC = FileOrErr.getError()) { Error = SMDiagnostic(Filename, SourceMgr::DK_Error, "Could not open input file: " + EC.message()); |