diff options
author | Alp Toker <alp@nuanti.com> | 2014-06-27 04:34:44 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2014-06-27 04:34:44 +0000 |
commit | f85d10e6c52e1ff79200ecdc9247814281949546 (patch) | |
tree | daf61eac56236be98b639adc68a3eff77b089f78 | |
parent | 52d6ea4398de8f971a7d798286339ea25fb6f9d2 (diff) | |
download | clang-f85d10e6c52e1ff79200ecdc9247814281949546.tar.gz clang-f85d10e6c52e1ff79200ecdc9247814281949546.tar.bz2 clang-f85d10e6c52e1ff79200ecdc9247814281949546.tar.xz |
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
-rw-r--r-- | lib/CodeGen/CodeGenAction.cpp | 7 |
1 files changed, 1 insertions, 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( |