diff options
author | Daniel Grumberg <dgrumberg@apple.com> | 2024-04-03 10:18:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-03 10:18:05 +0100 |
commit | e05c1b46d0d3739cc48ad912dbe6e9affce05927 (patch) | |
tree | 20d0889fdf84cf04bd0de6b25f7c4dd3e7045fd5 /clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | |
parent | 7c7ce0b9b1cef51e24f2dc7e904a8adf6aaf1abf (diff) | |
download | llvm-e05c1b46d0d3739cc48ad912dbe6e9affce05927.zip llvm-e05c1b46d0d3739cc48ad912dbe6e9affce05927.tar.gz llvm-e05c1b46d0d3739cc48ad912dbe6e9affce05927.tar.bz2 |
Reenable external categories (#87357)
Reenables b31414bf4f9898f7817a9fcf8a91f62ec26f3eaf.
Also adds a new warning for missing `--symbol-graph-dir` arg when
`--emit-extension-symbol-graphs` is provided. This also reverts the
commit that removed.
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
-rw-r--r-- | clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index 2446aee..f85f036 100644 --- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -181,9 +181,13 @@ CreateFrontendAction(CompilerInstance &CI) { #endif // Wrap the base FE action in an extract api action to generate - // symbol graph as a biproduct of compilation ( enabled with - // --emit-symbol-graph option ) - if (!FEOpts.SymbolGraphOutputDir.empty()) { + // symbol graph as a biproduct of compilation (enabled with + // --emit-symbol-graph option) + if (FEOpts.EmitSymbolGraph) { + if (FEOpts.SymbolGraphOutputDir.empty()) { + CI.getDiagnostics().Report(diag::warn_missing_symbol_graph_dir); + CI.getFrontendOpts().SymbolGraphOutputDir = "."; + } CI.getCodeGenOpts().ClearASTBeforeBackend = false; Act = std::make_unique<WrappingExtractAPIAction>(std::move(Act)); } |