summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-06-27 09:24:27 +0000
committerAlp Toker <alp@nuanti.com>2014-06-27 09:24:27 +0000
commit11a33cee19725d88b474912665c72835db03a87f (patch)
treecdfd4a0d0d2383e79e34670abb7a5db3fba366cd
parentdb5f8b25707a23dd5852a35539775f7e8cf8896e (diff)
downloadclang-11a33cee19725d88b474912665c72835db03a87f.tar.gz
clang-11a33cee19725d88b474912665c72835db03a87f.tar.bz2
clang-11a33cee19725d88b474912665c72835db03a87f.tar.xz
const_cast the memory MemoryBuffer following LLVM r211883
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211884 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/CodeGenAction.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenAction.cpp b/lib/CodeGen/CodeGenAction.cpp
index 1a092fcedb..18fa0fad92 100644
--- a/lib/CodeGen/CodeGenAction.cpp
+++ b/lib/CodeGen/CodeGenAction.cpp
@@ -647,7 +647,8 @@ void CodeGenAction::ExecuteAction() {
return;
llvm::SMDiagnostic Err;
- TheModule.reset(ParseIR(MainFile, Err, *VMContext));
+ TheModule.reset(
+ ParseIR(const_cast<MemoryBuffer *>(MainFile), Err, *VMContext));
if (!TheModule) {
// Translate from the diagnostic info to the SourceManager location.
SourceLocation Loc = SM.translateFileLineCol(