Last-second refactoring before push was bad idea...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281812
91177308-0d34-0410-b5e6-
96231b3b80d8
std::unique_ptr<MIRParser>
llvm::createMIRParser(std::unique_ptr<MemoryBuffer> Contents,
LLVMContext &Context) {
+ auto Filename = Contents->getBufferIdentifier();
if (Context.shouldDiscardValueNames()) {
Context.diagnose(DiagnosticInfoMIRParser(
DS_Error,
"Can't read MIR with a Context that discards named Values")));
return nullptr;
}
- auto Filename = Contents->getBufferIdentifier();
return llvm::make_unique<MIRParser>(
llvm::make_unique<MIRParserImpl>(std::move(Contents), Filename, Context));
}