Update for llvm api change in r209266.
llvm-svn: 209303
diff --git a/lldb/source/Expression/ClangExpressionParser.cpp b/lldb/source/Expression/ClangExpressionParser.cpp
index 4eb64aa..afe66e3 100644
--- a/lldb/source/Expression/ClangExpressionParser.cpp
+++ b/lldb/source/Expression/ClangExpressionParser.cpp
@@ -311,7 +311,8 @@
diag_buf->FlushDiagnostics (m_compiler->getDiagnostics());
const char *expr_text = m_expr.Text();
-
+
+ clang::SourceManager &SourceMgr = m_compiler->getSourceManager();
bool created_main_file = false;
if (m_compiler->getCodeGenOpts().getDebugInfo() == CodeGenOptions::FullDebugInfo)
{
@@ -340,7 +341,9 @@
if (bytes_written == expr_text_len)
{
file.Close();
- m_compiler->getSourceManager().createMainFileID(m_file_manager->getFile(temp_source_path));
+ SourceMgr.setMainFileID(SourceMgr.createFileID(
+ m_file_manager->getFile(temp_source_path),
+ SourceLocation(), SrcMgr::C_User));
created_main_file = true;
}
}
@@ -350,7 +353,7 @@
if (!created_main_file)
{
MemoryBuffer *memory_buffer = MemoryBuffer::getMemBufferCopy(expr_text, __FUNCTION__);
- m_compiler->getSourceManager().createMainFileIDForMemBuffer (memory_buffer);
+ SourceMgr.setMainFileID(SourceMgr.createFileID(memory_buffer));
}
diag_buf->BeginSourceFile(m_compiler->getLangOpts(), &m_compiler->getPreprocessor());