Skip to content

Commit 21361bb

Browse files
authored
[clang] Remove unused argument. NFC. (#73594)
1 parent c728842 commit 21361bb

File tree

7 files changed

+20
-25
lines changed

7 files changed

+20
-25
lines changed

clang/include/clang/Frontend/ASTUnit.h

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -691,18 +691,16 @@ class ASTUnit {
691691
/// lifetime is expected to extend past that of the returned ASTUnit.
692692
///
693693
/// \returns - The initialized ASTUnit or null if the AST failed to load.
694-
static std::unique_ptr<ASTUnit>
695-
LoadFromASTFile(const std::string &Filename,
696-
const PCHContainerReader &PCHContainerRdr, WhatToLoad ToLoad,
697-
IntrusiveRefCntPtr<DiagnosticsEngine> Diags,
698-
const FileSystemOptions &FileSystemOpts,
699-
std::shared_ptr<HeaderSearchOptions> HSOpts,
700-
bool UseDebugInfo = false, bool OnlyLocalDecls = false,
701-
CaptureDiagsKind CaptureDiagnostics = CaptureDiagsKind::None,
702-
bool AllowASTWithCompilerErrors = false,
703-
bool UserFilesAreVolatile = false,
704-
IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS =
705-
llvm::vfs::getRealFileSystem());
694+
static std::unique_ptr<ASTUnit> LoadFromASTFile(
695+
const std::string &Filename, const PCHContainerReader &PCHContainerRdr,
696+
WhatToLoad ToLoad, IntrusiveRefCntPtr<DiagnosticsEngine> Diags,
697+
const FileSystemOptions &FileSystemOpts,
698+
std::shared_ptr<HeaderSearchOptions> HSOpts, bool OnlyLocalDecls = false,
699+
CaptureDiagsKind CaptureDiagnostics = CaptureDiagsKind::None,
700+
bool AllowASTWithCompilerErrors = false,
701+
bool UserFilesAreVolatile = false,
702+
IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS =
703+
llvm::vfs::getRealFileSystem());
706704

707705
private:
708706
/// Helper function for \c LoadFromCompilerInvocation() and

clang/lib/Frontend/ASTMerge.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void ASTMergeAction::ExecuteAction() {
4848
/*ShouldOwnClient=*/true));
4949
std::unique_ptr<ASTUnit> Unit = ASTUnit::LoadFromASTFile(
5050
ASTFiles[I], CI.getPCHContainerReader(), ASTUnit::LoadEverything, Diags,
51-
CI.getFileSystemOpts(), CI.getHeaderSearchOptsPtr(), false);
51+
CI.getFileSystemOpts(), CI.getHeaderSearchOptsPtr());
5252

5353
if (!Unit)
5454
continue;

clang/lib/Frontend/ASTUnit.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -790,10 +790,9 @@ std::unique_ptr<ASTUnit> ASTUnit::LoadFromASTFile(
790790
const std::string &Filename, const PCHContainerReader &PCHContainerRdr,
791791
WhatToLoad ToLoad, IntrusiveRefCntPtr<DiagnosticsEngine> Diags,
792792
const FileSystemOptions &FileSystemOpts,
793-
std::shared_ptr<HeaderSearchOptions> HSOpts, bool UseDebugInfo,
794-
bool OnlyLocalDecls, CaptureDiagsKind CaptureDiagnostics,
795-
bool AllowASTWithCompilerErrors, bool UserFilesAreVolatile,
796-
IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS) {
793+
std::shared_ptr<HeaderSearchOptions> HSOpts, bool OnlyLocalDecls,
794+
CaptureDiagsKind CaptureDiagnostics, bool AllowASTWithCompilerErrors,
795+
bool UserFilesAreVolatile, IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS) {
797796
std::unique_ptr<ASTUnit> AST(new ASTUnit(true));
798797

799798
// Recover resources if we crash before exiting this method.

clang/lib/Frontend/FrontendAction.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
621621
std::unique_ptr<ASTUnit> AST = ASTUnit::LoadFromASTFile(
622622
std::string(InputFile), CI.getPCHContainerReader(),
623623
ASTUnit::LoadPreprocessorOnly, ASTDiags, CI.getFileSystemOpts(),
624-
/*HeaderSearchOptions=*/nullptr, CI.getCodeGenOpts().DebugTypeExtRefs);
624+
/*HeaderSearchOptions=*/nullptr);
625625
if (!AST)
626626
return false;
627627

@@ -689,8 +689,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
689689
std::unique_ptr<ASTUnit> AST = ASTUnit::LoadFromASTFile(
690690
std::string(InputFile), CI.getPCHContainerReader(),
691691
ASTUnit::LoadEverything, Diags, CI.getFileSystemOpts(),
692-
CI.getHeaderSearchOptsPtr(),
693-
CI.getCodeGenOpts().DebugTypeExtRefs);
692+
CI.getHeaderSearchOptsPtr());
694693

695694
if (!AST)
696695
return false;

clang/tools/c-index-test/core_main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ static bool printSourceSymbolsFromModule(StringRef modulePath,
276276
CompilerInstance::createDiagnostics(new DiagnosticOptions());
277277
std::unique_ptr<ASTUnit> AU = ASTUnit::LoadFromASTFile(
278278
std::string(modulePath), *pchRdr, ASTUnit::LoadASTOnly, Diags,
279-
FileSystemOpts, HSOpts, /*UseDebugInfo=*/false,
279+
FileSystemOpts, HSOpts,
280280
/*OnlyLocalDecls=*/true, CaptureDiagsKind::None,
281281
/*AllowASTWithCompilerErrors=*/true,
282282
/*UserFilesAreVolatile=*/false);

clang/tools/libclang/CIndex.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3877,8 +3877,8 @@ enum CXErrorCode clang_createTranslationUnit2(CXIndex CIdx,
38773877
std::unique_ptr<ASTUnit> AU = ASTUnit::LoadFromASTFile(
38783878
ast_filename, CXXIdx->getPCHContainerOperations()->getRawReader(),
38793879
ASTUnit::LoadEverything, Diags, FileSystemOpts, HSOpts,
3880-
/*UseDebugInfo=*/false, CXXIdx->getOnlyLocalDecls(),
3881-
CaptureDiagsKind::All, /*AllowASTWithCompilerErrors=*/true,
3880+
CXXIdx->getOnlyLocalDecls(), CaptureDiagsKind::All,
3881+
/*AllowASTWithCompilerErrors=*/true,
38823882
/*UserFilesAreVolatile=*/true);
38833883
*out_TU = MakeCXTranslationUnit(CXXIdx, std::move(AU));
38843884
return *out_TU ? CXError_Success : CXError_Failure;

clang/unittests/Frontend/ASTUnitTest.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ TEST_F(ASTUnitTest, SaveLoadPreservesLangOptionsInPrintingPolicy) {
9393

9494
std::unique_ptr<ASTUnit> AU = ASTUnit::LoadFromASTFile(
9595
std::string(ASTFileName.str()), PCHContainerOps->getRawReader(),
96-
ASTUnit::LoadEverything, Diags, FileSystemOptions(), HSOpts,
97-
/*UseDebugInfo=*/false);
96+
ASTUnit::LoadEverything, Diags, FileSystemOptions(), HSOpts);
9897

9998
if (!AU)
10099
FAIL() << "failed to load ASTUnit";

0 commit comments

Comments
 (0)