From f3f34d644387b603cb79d6e4ec6c24b4f702c606 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Sat, 17 Sep 2016 05:41:02 +0000 Subject: [PATCH] [MIR Parser] Fix Build! 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 --- lib/CodeGen/MIRParser/MIRParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/MIRParser/MIRParser.cpp b/lib/CodeGen/MIRParser/MIRParser.cpp index 35614d3b77b..9b0c5099680 100644 --- a/lib/CodeGen/MIRParser/MIRParser.cpp +++ b/lib/CodeGen/MIRParser/MIRParser.cpp @@ -828,6 +828,7 @@ std::unique_ptr llvm::createMIRParserFromFile(StringRef Filename, std::unique_ptr llvm::createMIRParser(std::unique_ptr Contents, LLVMContext &Context) { + auto Filename = Contents->getBufferIdentifier(); if (Context.shouldDiscardValueNames()) { Context.diagnose(DiagnosticInfoMIRParser( DS_Error, @@ -836,7 +837,6 @@ llvm::createMIRParser(std::unique_ptr Contents, "Can't read MIR with a Context that discards named Values"))); return nullptr; } - auto Filename = Contents->getBufferIdentifier(); return llvm::make_unique( llvm::make_unique(std::move(Contents), Filename, Context)); } -- 2.50.1