CodeGenAction: don't duplicate entire .ll/.bc files into memory

Requires supporting changes from LLVM r211861.

llvm-svn: 211862
This commit is contained in:
Alp Toker 2014-06-27 04:34:44 +00:00
parent 5ebb7b3112
commit dc2c475904
1 changed files with 1 additions and 6 deletions

View File

@ -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(