summaryrefslogtreecommitdiff
path: root/lib/TableGen/Main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/TableGen/Main.cpp')
-rw-r--r--lib/TableGen/Main.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/TableGen/Main.cpp b/lib/TableGen/Main.cpp
index e317fbfa373..d9c5601a5da 100644
--- a/lib/TableGen/Main.cpp
+++ b/lib/TableGen/Main.cpp
@@ -88,10 +88,9 @@ int TableGenMain(char *argv0, TableGenMainFn *MainFn) {
<< "': " << EC.message() << "\n";
return 1;
}
- MemoryBuffer *F = FileOrErr.get().release();
// Tell SrcMgr about this buffer, which is what TGParser will pick up.
- SrcMgr.AddNewSourceBuffer(F, SMLoc());
+ SrcMgr.AddNewSourceBuffer(std::move(*FileOrErr), SMLoc());
// Record the location of the include directory so that the lexer can find
// it later.