From e19f352beee72d8fc30d9a5366eadd2372719fa3 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 25 May 2023 14:47:57 -0700 Subject: [clang][lex] NFCI: Use DirectoryEntryRef in Preprocessor::MainFileDir This patch changes the type of `Preprocessor::MainFileDir` from `const DirectoryEntry *` to `Optional` in order to remove some calls to the deprecated `DirectoryEntry::getName()`. Depends on D127658. Reviewed By: bnbarham Differential Revision: https://reviews.llvm.org/D127660 --- clang/lib/Frontend/FrontendAction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Frontend/FrontendAction.cpp') diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp index 77d03c4..a8dcdb4 100644 --- a/clang/lib/Frontend/FrontendAction.cpp +++ b/clang/lib/Frontend/FrontendAction.cpp @@ -511,7 +511,7 @@ static Module *prepareToBuildModule(CompilerInstance &CI, // Inform the preprocessor that includes from within the input buffer should // be resolved relative to the build directory of the module map file. - CI.getPreprocessor().setMainFileDir(M->Directory); + CI.getPreprocessor().setMainFileDir(*M->Directory); // If the module was inferred from a different module map (via an expanded // umbrella module definition), track that fact. -- cgit v1.1