diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-11-01 00:46:54 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-11-01 00:46:54 +0000 |
commit | 17f00260ab6fa8a6d7b42d9bef89fc8879355ffd (patch) | |
tree | 1916863177a7df2f4a3ffc76766f8aeb5f01df07 /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 32c0c85382ab63ff38f58b41e904bbfe733d9a60 (diff) | |
download | llvm-17f00260ab6fa8a6d7b42d9bef89fc8879355ffd.zip llvm-17f00260ab6fa8a6d7b42d9bef89fc8879355ffd.tar.gz llvm-17f00260ab6fa8a6d7b42d9bef89fc8879355ffd.tar.bz2 |
Fix regression in behavior of clang -x c++-header -fmodule-name=XXX
-fsyntax-only.
The driver accidentally stopped passing the input filenames on to -cc1
in this mode due to confusion over what action was being requested.
This change also fixes a couple of crashes I encountered when passing
multiple files to such a -cc1 invocation.
llvm-svn: 345803
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index a8d80a0..d179cef 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -372,6 +372,9 @@ static void InitializeFileRemapping(DiagnosticsEngine &Diags, void CompilerInstance::createPreprocessor(TranslationUnitKind TUKind) { const PreprocessorOptions &PPOpts = getPreprocessorOpts(); + // The module manager holds a reference to the old prepreocssor (if any). + ModuleManager.reset(); + // Create a PTH manager if we are using some form of a token cache. PTHManager *PTHMgr = nullptr; if (!PPOpts.TokenCache.empty()) |