summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenAction.cpp
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-06-27 04:34:44 +0000
committerAlp Toker <alp@nuanti.com>2014-06-27 04:34:44 +0000
commitdc2c47590420878d8edb49be4a4734e8f886278d (patch)
treed2104f6878288887811edbdcecdad3bb43e36910 /clang/lib/CodeGen/CodeGenAction.cpp
parent5ebb7b311223bcd21d2b3d25413d1edacefcc63d (diff)
downloadbcm5719-llvm-dc2c47590420878d8edb49be4a4734e8f886278d.tar.gz
bcm5719-llvm-dc2c47590420878d8edb49be4a4734e8f886278d.zip
CodeGenAction: don't duplicate entire .ll/.bc files into memory
Requires supporting changes from LLVM r211861. llvm-svn: 211862
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenAction.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp
index f162c30700b..2b7fab3beb9 100644
--- a/clang/lib/CodeGen/CodeGenAction.cpp
+++ b/clang/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(
OpenPOWER on IntegriCloud