diff options
author | Egor Zhdan <e_zhdan@apple.com> | 2023-11-23 19:52:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-23 18:52:27 +0000 |
commit | 07d799f08fec4cb9ceb14a43cc134dee7f1621fc (patch) | |
tree | ffd33ea978dc0016451d84ab89f29695ad697255 /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 258631fc0c640b5091950a3323e2c51545c3f0a9 (diff) | |
download | llvm-07d799f08fec4cb9ceb14a43cc134dee7f1621fc.zip llvm-07d799f08fec4cb9ceb14a43cc134dee7f1621fc.tar.gz llvm-07d799f08fec4cb9ceb14a43cc134dee7f1621fc.tar.bz2 |
[APINotes] Upstream Driver and Frontend options that enable API Notes
This upstreams more of the Clang API Notes functionality that is
currently implemented in the Apple fork:
https://github.com/apple/llvm-project/tree/next/clang/lib/APINotes
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index be5b38d..e5f8c07 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -756,6 +756,14 @@ void CompilerInstance::createSema(TranslationUnitKind TUKind, TheSema->addExternalSource(ExternalSemaSrc.get()); ExternalSemaSrc->InitializeSema(*TheSema); } + + // If we're building a module and are supposed to load API notes, + // notify the API notes manager. + if (auto *currentModule = getPreprocessor().getCurrentModule()) { + (void)TheSema->APINotes.loadCurrentModuleAPINotes( + currentModule, getLangOpts().APINotesModules, + getAPINotesOpts().ModuleSearchPaths); + } } // Output Files |