aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2020-12-09 11:36:00 -0800
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2021-01-25 16:38:42 -0800
commit8b6aedc4c99a8419bc27949c7b9eb18af4cd486b (patch)
tree436df841dcdb38f8c9131eb070dc77b0f8f44c37
parentea87cf2acd82e435e485c6e1884b54ba7427a54d (diff)
downloadllvm-8b6aedc4c99a8419bc27949c7b9eb18af4cd486b.zip
llvm-8b6aedc4c99a8419bc27949c7b9eb18af4cd486b.tar.gz
llvm-8b6aedc4c99a8419bc27949c7b9eb18af4cd486b.tar.bz2
ExpressionParser: Migrate to FileEntryRef in ParseInternal, NFC
Migrate to the `FileEntryRef` overload of `SourceManager::createFileID` (using `FileManager::getOptionalFileRef`) in `ClangExpressionParser::ParseInternal`. No functionality change here. Differential Revision: https://reviews.llvm.org/D92957
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
index c61c010..7644a5e 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
@@ -1073,8 +1073,8 @@ ClangExpressionParser::ParseInternal(DiagnosticManager &diagnostic_manager,
if (file.Write(expr_text, bytes_written).Success()) {
if (bytes_written == expr_text_len) {
file.Close();
- if (auto fileEntry =
- m_compiler->getFileManager().getFile(result_path)) {
+ if (auto fileEntry = m_compiler->getFileManager().getOptionalFileRef(
+ result_path)) {
source_mgr.setMainFileID(source_mgr.createFileID(
*fileEntry,
SourceLocation(), SrcMgr::C_User));