r211862 - CodeGenAction: don't duplicate entire .ll/.bc files into memory
Alp Toker
alp at nuanti.com
Thu Jun 26 21:34:44 PDT 2014
Author: alp
Date: Thu Jun 26 23:34:44 2014
New Revision: 211862
URL: http://llvm.org/viewvc/llvm-project?rev=211862&view=rev
Log:
CodeGenAction: don't duplicate entire .ll/.bc files into memory
Requires supporting changes from LLVM r211861.
Modified:
cfe/trunk/lib/CodeGen/CodeGenAction.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenAction.cpp?rev=211862&r1=211861&r2=211862&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenAction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenAction.cpp Thu Jun 26 23:34:44 2014
@@ -644,13 +644,8 @@ void CodeGenAction::ExecuteAction() {
if (Invalid)
return;
- // FIXME: This is stupid, IRReader shouldn't take ownership.
- llvm::MemoryBuffer *MainFileCopy =
- llvm::MemoryBuffer::getMemBufferCopy(MainFile->getBuffer(),
- getCurrentFile());
-
llvm::SMDiagnostic Err;
- TheModule.reset(ParseIR(MainFileCopy, Err, *VMContext));
+ TheModule.reset(ParseIR(MainFile, Err, *VMContext));
if (!TheModule) {
// Translate from the diagnostic info to the SourceManager location.
SourceLocation Loc = SM.translateFileLineCol(
More information about the cfe-commits
mailing list