Skip to content

Commit 44de7aa

Browse files
committed
[clang] Remove unused argument. NFC. (llvm#73594)
(cherry picked from commit 21361bb)
1 parent 87f55c1 commit 44de7aa

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
@@ -689,18 +689,16 @@ class ASTUnit {
689689
/// lifetime is expected to extend past that of the returned ASTUnit.
690690
///
691691
/// \returns - The initialized ASTUnit or null if the AST failed to load.
692-
static std::unique_ptr<ASTUnit>
693-
LoadFromASTFile(const std::string &Filename,
694-
const PCHContainerReader &PCHContainerRdr, WhatToLoad ToLoad,
695-
IntrusiveRefCntPtr<DiagnosticsEngine> Diags,
696-
const FileSystemOptions &FileSystemOpts,
697-
std::shared_ptr<HeaderSearchOptions> HSOpts,
698-
bool UseDebugInfo = false, 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());
692+
static std::unique_ptr<ASTUnit> LoadFromASTFile(
693+
const std::string &Filename, const PCHContainerReader &PCHContainerRdr,
694+
WhatToLoad ToLoad, IntrusiveRefCntPtr<DiagnosticsEngine> Diags,
695+
const FileSystemOptions &FileSystemOpts,
696+
std::shared_ptr<HeaderSearchOptions> HSOpts, bool OnlyLocalDecls = false,
697+
CaptureDiagsKind CaptureDiagnostics = CaptureDiagsKind::None,
698+
bool AllowASTWithCompilerErrors = false,
699+
bool UserFilesAreVolatile = false,
700+
IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS =
701+
llvm::vfs::getRealFileSystem());
704702

705703
private:
706704
/// 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
@@ -786,10 +786,9 @@ std::unique_ptr<ASTUnit> ASTUnit::LoadFromASTFile(
786786
const std::string &Filename, const PCHContainerReader &PCHContainerRdr,
787787
WhatToLoad ToLoad, IntrusiveRefCntPtr<DiagnosticsEngine> Diags,
788788
const FileSystemOptions &FileSystemOpts,
789-
std::shared_ptr<HeaderSearchOptions> HSOpts, bool UseDebugInfo,
790-
bool OnlyLocalDecls, CaptureDiagsKind CaptureDiagnostics,
791-
bool AllowASTWithCompilerErrors, bool UserFilesAreVolatile,
792-
IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS) {
789+
std::shared_ptr<HeaderSearchOptions> HSOpts, bool OnlyLocalDecls,
790+
CaptureDiagsKind CaptureDiagnostics, bool AllowASTWithCompilerErrors,
791+
bool UserFilesAreVolatile, IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS) {
793792
std::unique_ptr<ASTUnit> AST(new ASTUnit(true));
794793

795794
// 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
@@ -743,7 +743,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
743743
std::unique_ptr<ASTUnit> AST = ASTUnit::LoadFromASTFile(
744744
std::string(InputFile), CI.getPCHContainerReader(),
745745
ASTUnit::LoadPreprocessorOnly, ASTDiags, CI.getFileSystemOpts(),
746-
/*HeaderSearchOptions=*/nullptr, CI.getCodeGenOpts().DebugTypeExtRefs);
746+
/*HeaderSearchOptions=*/nullptr);
747747
if (!AST)
748748
return false;
749749

@@ -811,8 +811,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
811811
std::unique_ptr<ASTUnit> AST = ASTUnit::LoadFromASTFile(
812812
std::string(InputFile), CI.getPCHContainerReader(),
813813
ASTUnit::LoadEverything, Diags, CI.getFileSystemOpts(),
814-
CI.getHeaderSearchOptsPtr(),
815-
CI.getCodeGenOpts().DebugTypeExtRefs);
814+
CI.getHeaderSearchOptsPtr());
816815

817816
if (!AST)
818817
return false;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ static bool printSourceSymbolsFromModule(StringRef modulePath,
356356
CompilerInstance::createDiagnostics(new DiagnosticOptions());
357357
std::unique_ptr<ASTUnit> AU = ASTUnit::LoadFromASTFile(
358358
std::string(modulePath), *pchRdr, ASTUnit::LoadASTOnly, Diags,
359-
FileSystemOpts, HSOpts, /*UseDebugInfo=*/false,
359+
FileSystemOpts, HSOpts,
360360
/*OnlyLocalDecls=*/true, CaptureDiagsKind::None,
361361
/*AllowASTWithCompilerErrors=*/true,
362362
/*UserFilesAreVolatile=*/false);

clang/tools/libclang/CIndex.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3810,8 +3810,8 @@ enum CXErrorCode clang_createTranslationUnit2(CXIndex CIdx,
38103810
std::unique_ptr<ASTUnit> AU = ASTUnit::LoadFromASTFile(
38113811
ast_filename, CXXIdx->getPCHContainerOperations()->getRawReader(),
38123812
ASTUnit::LoadEverything, Diags, FileSystemOpts, HSOpts,
3813-
/*UseDebugInfo=*/false, CXXIdx->getOnlyLocalDecls(),
3814-
CaptureDiagsKind::All, /*AllowASTWithCompilerErrors=*/true,
3813+
CXXIdx->getOnlyLocalDecls(), CaptureDiagsKind::All,
3814+
/*AllowASTWithCompilerErrors=*/true,
38153815
/*UserFilesAreVolatile=*/true);
38163816
*out_TU = MakeCXTranslationUnit(CXXIdx, std::move(AU));
38173817
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)