[lldb] Fix build error after 7bca6f45
authorJan Svoboda <jan_svoboda@apple.com>
Thu, 15 Jun 2023 09:59:31 +0000 (11:59 +0200)
committerJan Svoboda <jan_svoboda@apple.com>
Thu, 15 Jun 2023 09:59:47 +0000 (11:59 +0200)
lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp

index 0af5de4702df6c4af0bd246abc08ad17f4bcf323..5ce0d35378230cf93476f70993da20dde305ce3d 100644 (file)
@@ -329,8 +329,8 @@ bool ClangModulesDeclVendorImpl::AddModule(const SourceModule &module,
 
       bool is_system = true;
       bool is_framework = false;
-      auto dir =
-          HS.getFileMgr().getDirectory(module.search_path.GetStringRef());
+      auto dir = HS.getFileMgr().getOptionalDirectoryRef(
+          module.search_path.GetStringRef());
       if (!dir)
         return error();
       auto file = HS.lookupModuleMapFile(*dir, is_framework);