diff options
Diffstat (limited to 'lib/CodeGen/CodeGenAction.cpp')
| -rw-r--r-- | lib/CodeGen/CodeGenAction.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/CodeGen/CodeGenAction.cpp b/lib/CodeGen/CodeGenAction.cpp index 18fa0fad92..3342aa12c8 100644 --- a/lib/CodeGen/CodeGenAction.cpp +++ b/lib/CodeGen/CodeGenAction.cpp @@ -641,14 +641,12 @@ void CodeGenAction::ExecuteAction() { bool Invalid; SourceManager &SM = CI.getSourceManager(); - const llvm::MemoryBuffer *MainFile = SM.getBuffer(SM.getMainFileID(), - &Invalid); + llvm::MemoryBuffer *MainFile = SM.getBuffer(SM.getMainFileID(), &Invalid); if (Invalid) return; llvm::SMDiagnostic Err; - TheModule.reset( - ParseIR(const_cast<MemoryBuffer *>(MainFile), Err, *VMContext)); + TheModule.reset(ParseIR(MainFile, Err, *VMContext)); if (!TheModule) { // Translate from the diagnostic info to the SourceManager location. SourceLocation Loc = SM.translateFileLineCol( |
