From 895a23fa2be9840909ca0f62c1d41d75cbebb63e Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Fri, 27 Jun 2014 09:24:27 +0000 Subject: [PATCH] const_cast the memory MemoryBuffer following LLVM r211883 llvm-svn: 211884 --- clang/lib/CodeGen/CodeGenAction.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index 1a092fc..18fa0fa 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/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(MainFile), Err, *VMContext)); if (!TheModule) { // Translate from the diagnostic info to the SourceManager location. SourceLocation Loc = SM.translateFileLineCol( -- 2.7.4