Skip to content

Commit 40a1b3a

Browse files
authored
Merge pull request #1949 from Teemperor/RemoveSwiftDoubleExprFile
[ClangExpressionParser] Revert duplicated file creation logic apple-llvm-split-commit: fb94e123cb41b1d4f5c88ad655fcdb7b582cf128 apple-llvm-split-dir: lldb/
2 parents 2a1c851 + a4335fb commit 40a1b3a

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -830,24 +830,6 @@ ClangExpressionParser::ParseInternal(DiagnosticManager &diagnostic_manager,
830830

831831
clang::SourceManager &source_mgr = m_compiler->getSourceManager();
832832
bool created_main_file = false;
833-
/* Swift only */
834-
if (m_expr.GetOptions() &&
835-
m_expr.GetOptions()->GetPoundLineFilePath() == NULL &&
836-
m_compiler->getCodeGenOpts().getDebugInfo() ==
837-
codegenoptions::FullDebugInfo) {
838-
std::string temp_source_path;
839-
if (ExpressionSourceCode::SaveExpressionTextToTempFile(
840-
expr_text, *m_expr.GetOptions(), temp_source_path)) {
841-
auto file = m_compiler->getFileManager().getFile(temp_source_path);
842-
if (file) {
843-
source_mgr.setMainFileID(
844-
source_mgr.createFileID(file, SourceLocation(), SrcMgr::C_User));
845-
created_main_file = true;
846-
}
847-
}
848-
}
849-
/* end swift only */
850-
851833
// Clang wants to do completion on a real file known by Clang's file manager,
852834
// so we have to create one to make this work.
853835
// TODO: We probably could also simulate to Clang's file manager that there

0 commit comments

Comments
 (0)