From f85d10e6c52e1ff79200ecdc9247814281949546 Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Fri, 27 Jun 2014 04:34:44 +0000 Subject: CodeGenAction: don't duplicate entire .ll/.bc files into memory Requires supporting changes from LLVM r211861. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211862 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenAction.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/CodeGen/CodeGenAction.cpp b/lib/CodeGen/CodeGenAction.cpp index f162c30700..2b7fab3beb 100644 --- a/lib/CodeGen/CodeGenAction.cpp +++ b/lib/CodeGen/CodeGenAction.cpp @@ -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( -- cgit v1.2.3