aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/FrontendAction.cpp
AgeCommit message (Collapse)AuthorFilesLines
2023-05-30[clang][lex] NFCI: Use FileEntryRef in ModuleMap::{load,lookup}ModuleMap()Jan Svoboda1-4/+5
This patch changes the return/argument types of `ModuleMap::{load,lookup}ModuleMap()` from `const FileEntry *` to `FileEntryRef` in order to remove uses of the deprecated `DirectoryEntry::getName()`. Reviewed By: bnbarham Differential Revision: https://reviews.llvm.org/D127647
2023-05-26[clang][modules] NFCI: Distinguish as-written and effective umbrella directoriesJan Svoboda1-3/+4
For modules with umbrellas, we track how they were written in the module map. Unfortunately, the getter for the umbrella directory conflates the "as written" directory and the "effective" directory (either the written one or the parent of the written umbrella header). This patch makes the distinction between "as written" and "effective" umbrella directories clearer. No functional change intended. Reviewed By: benlangmuir Differential Revision: https://reviews.llvm.org/D151581
2023-05-23[C++20] [Modules] Don't ignore -fmodule-file when we compile pcm filesChuanqi Xu1-1/+2
Close https://github.com/llvm/llvm-project/issues/62843. Previously when we compile .pcm files into .o files, the `-fmodule-file=<module-name>=<module-path>` option is ignored. This is conflicted with our consensus in https://github.com/llvm/llvm-project/issues/62707.
2023-04-24[clang] Make access to submodules via `iterator_range`Stoorx1-4/+2
In file `clang/lib/Basic/Module.cpp` the `Module` class had `submodule_begin()` and `submodule_end()` functions to retrieve corresponding iterators for private vector of Modules. This commit removes mentioned functions, and replaces all of theirs usages with `submodules()` function and range-based for-loops. Differential Revision: https://reviews.llvm.org/D148954
2023-02-06[Modules] Recreate file manager for ftime-trace when compiling a moduleChuanqi Xu1-0/+3
Close https://github.com/llvm/llvm-project/issues/60544. The root cause for the issue is that when we compile a module unit, the file manager (and proprocessor and source manager) are owned by AST instead of the compilaton instance. So the file manager may be invalid when we want to create a time-report file for -ftime-trace when we are compiling a module unit. This patch tries to recreate the file manager for -ftime-trace if we find the file manager is not valid.
2023-01-20[clang][nfc] refactor Module::Header to use OptionalFileEntryRefRichard Howell1-2/+5
Refactor the `Module::Header` class to use an `OptionalFileEntryRef` instead of a `FileEntry*`. This is preparation for refactoring the `TopHeaderNames` to use `FileEntryRef` so that we preserve the lookup path of the headers when serializing. This is mostly based on https://reviews.llvm.org/D90497 Reviewed By: jansvoboda11 Differential Revision: https://reviews.llvm.org/D142113
2022-12-20[Clang] Prepare for llvm::Optional becoming std::optional.Benjamin Kramer1-1/+1
The needed tweaks are mostly trivial, the one nasty bit is Clang's usage of OptionalStorage. To keep this working old Optional stays around as clang::CustomizableOptional, with the default Storage removed. Optional<File/DirectoryEntryRef> is replaced with a typedef. I tested this with GCC 7.5, the oldest supported GCC I had around. Differential Revision: https://reviews.llvm.org/D140332
2022-12-18Revert "[clang] Convert OptionalFileEntryRefDegradesToFileEntryPtr to ↵Krzysztof Parzyszek1-2/+1
std::optional" This reverts commit 8f0df9f3bbc6d7f3d5cbfd955c5ee4404c53a75d. The Optional*RefDegradesTo*EntryPtr types want to keep the same size as the underlying type, which std::optional doesn't guarantee. For use with llvm::Optional, they define their own storage class, and there is no way to do that in std::optional. On top of that, that commit broke builds with older GCCs, where std::optional was not trivially copyable (static_assert in the clang sources was failing).
2022-12-17[clang] Convert OptionalFileEntryRefDegradesToFileEntryPtr to std::optionalKrzysztof Parzyszek1-1/+2
2022-12-03[clang] Use std::nullopt instead of None (NFC)Kazu Hirata1-1/+1
This patch mechanically replaces None with std::nullopt where the compiler would warn if None were deprecated. The intent is to reduce the amount of manual work required in migrating from Optional to std::optional. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2022-11-17[clang] Use InMemoryModuleCache for readASTFileControlBlock NFCBen Langmuir1-2/+3
When a pcm has already been loaded from disk, reuse it from the InMemoryModuleCache in readASTFileControlBlock. This avoids potentially reading it again. As noted in the FIXME, ideally we would also add the module to the cache if it will be used again later, but that could modify its build state and we do not have enough context currenlty to know if it's correct. Differential Revision: https://reviews.llvm.org/D138160
2022-11-15[clang][deps] Avoid leaking modulemap paths across unrelated importsBen Langmuir1-5/+4
Use a FileEntryRef when retrieving modulemap paths in the scanner so that we use a path compatible with the original module import, rather than a FileEntry which can allow unrelated modules to leak paths into how we build a module due to FileManager mutating the path. Note: the current change prevents an "unrelated" path, but does not change how VFS mapped paths are handled (which would be calling getNameAsRequested) nor canonicalize the path. Differential Revision: https://reviews.llvm.org/D137989
2022-10-11[clang][deps] Prevent emitting diagnostics outside of source fileJan Svoboda1-0/+3
The dependency scanner needs to report the module map file describing the module whose implementation is being compiled (see D134222). However, calling `Preprocessor::getCurrentModuleImplementation()` in the scanner might cause a diagnostic during module map parsing and emitting a diagnostic without being "in" a source file is illegal (e.g. in `TextDiagnosticPrinter`). This patch ensures the module map parse is triggered while the compiler is still "in" a source file, avoiding the failure case. Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D135637
2022-09-20[HLSL] Support PCH for cc1 modeXiang Li1-2/+9
Add HLSLExternalSemaSource as ExternalSemaSource instead of ASTContext::ExternalSource when PCH is included. This allows a different external source to be set for the AST context. Reviewed By: beanz Differential Revision: https://reviews.llvm.org/D132421
2022-08-27Use llvm::is_contained (NFC)Kazu Hirata1-4/+2
2022-08-26[clang] Enable output of SARIF diagnosticsAbraham Corea Diaz1-1/+11
Enables Clang to emit diagnostics in SARIF format when `-fdiagnostics-format=sarif`. Adds a new DiagnosticConsumer named SARIFDiagnosticPrinter and a new DiagnosticRenderer named SARIFDiagnostic to constuct and emit a SARIF object containing the run's basic diagnostic info. Reviewed By: cjdb, denik, aaron.ballman Differential Revision: https://reviews.llvm.org/D131632
2022-08-10[clang] Require strict matches for defines for PCH in GCC style directoriesMartin Storsjö1-1/+1
When clang includes a PCH, it tolerates some amount of differences between the defines used when creating and when including the PCH - this seems to be intentionally allowed in c379c072405f39bca1d3552408fc0427328e8b6d (and later extended in b63687519610a73dd565be1fec28332211b4df5b). When using a PCH (or when picking a PCH out of a directory containing multiple candidates) Clang used to accept the header if there were defines on the command line when creating the PCH that are missing when using the PCH, or vice versa, defines only set when using the PCH. The only cases where Clang explicitly rejected the use of a PCH is if there was an explicit conflict between the options, e.g. -DFOO=1 vs -DFOO=2, or -DFOO vs -UFOO. The latter commit added a FIXME that we really should check whether mismatched defines actually were used somewhere in the PCH, so that the define would affect the outcome. This FIXME has stood unaddressed since 2012. This differs from GCC, which rejects PCH files if the defines differ at all. When explicitly including a single PCH file, the relaxed policy of allowing minor differences is harmless for correct use cases (but may fail to diagnose mismtaches), and potentially allow using PCHs in wider cases (where the user intentionally know that the differences in defines are harmless for the PCH). However, for GCC style PCH directories, with a directory containing multiple PCH variants and the compiler should pick the correct match out of them, Clang's relaxed logic was problematic. The directory could contain two otherwise identical PCHs, but one built with -DFOO and one without. When attempting to include a PCH and iterating over the candidates in the directory, Clang would essentially pick the first one out of the two, even if there existed a better, exact match in the directory. Keep the relaxed checking when specificlly including one named PCH file, but require strict matches when trying to pick the right candidate out of a GCC style directory with alternatives. This fixes https://github.com/lhmouse/mcfgthread/issues/63. Differential Revision: https://reviews.llvm.org/D126676
2022-07-23Use the range-based overload of llvm::sort where possibleDmitri Gribenko1-2/+1
Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D130403
2022-07-07[clang] Cleanup ASTContext before output files in crash recovery for modulesBen Langmuir1-0/+1
When we recover from a crash in a module compilation thread, we need to ensure any output streams owned by the ASTConsumer (e.g. in RawPCHContainerGenerator) are deleted before we call clearOutputFiles(). This has the same theoretical issues with proxy streams that Duncan discusses in the commit 2d133867833fe8eb. In practice, this was observed as a use-after-free crash on a downstream branch that uses such a proxy stream in this code path. Add an assertion so it won't regress. Differential Revision: https://reviews.llvm.org/D129220 rdar://96525032
2022-07-05[HLSL] Add ExternalSemaSource & vector aliasChris Bieneman1-0/+8
HLSL vector types are ext_vector types, but they are also exposed via a template syntax `vector<T, #>`. This is morally equavalent to the code: ```c++ template <typename T, int Size> using vector = T __attribute__((ext_vector_type(Size))) ``` The problem is that templates aren't supported before HLSL 2021, and type aliases still aren't supported in HLSL. To resolve this (and other issues where HLSL can't represent its own types), we rely on an external AST & Sema source being registered for HLSL code. This patch adds the HLSLExternalSemaSource and registers the vector type alias. Depends on D127802 Differential Revision: https://reviews.llvm.org/D128012
2022-06-18Prefer `getCurrentFileOrBufferName` in `FrontendAction::EndSourceFile`Yuki Okushi1-1/+1
`getCurrentFile` here causes an assertion on some condition. `getCurrentFileOrBufferName` is preferrable instead. llvm#55950 Differential Revision: https://reviews.llvm.org/D127509
2022-06-17Revert "wip"Chris Bieneman1-8/+0
This reverts commit 0dd243fa8a4ec98d6cabbad16e6b485a093c6dea. I accidentally pushed this! Oops!
2022-06-17wipChris Bieneman1-0/+8
2022-06-04Use llvm::less_first (NFC)Kazu Hirata1-5/+1
2022-05-27Revert "[llvm][clang][bolt][NFC] Use llvm::less_first() when applicable"Balazs Benics1-1/+5
This reverts commit 3988bd13988aad72ec979beb2361e8738584926b. Did not build on this bot: https://lab.llvm.org/buildbot#builders/215/builds/6372 /usr/include/c++/9/bits/predefined_ops.h:177:11: error: no match for call to ‘(llvm::less_first) (std::pair<long unsigned int, llvm::bolt::BinaryBasicBlock*>&, const std::pair<long unsigned int, std::nullptr_t>&)’ 177 | { return bool(_M_comp(*__it, __val)); }
2022-05-27[llvm][clang][bolt][NFC] Use llvm::less_first() when applicableBalazs Benics1-5/+1
One could reuse this functor instead of rolling out your own version. There were a couple other cases where the code was similar, but not quite the same, such as it might have an assertion in the lambda or other constructs. Thus, I've not touched any of those, as it might change the behavior in some way. As per https://discourse.llvm.org/t/submitting-simple-nfc-patches/62640/3?u=steakhal Chris Lattner > LLVM intentionally has a “yes, you can apply common sense judgement to > things” policy when it comes to code review. If you are doing mechanical > patches (e.g. adopting less_first) that apply to the entire monorepo, > then you don’t need everyone in the monorepo to sign off on it. Having > some +1 validation from someone is useful, but you don’t need everyone > whose code you touch to weigh in. Differential Revision: https://reviews.llvm.org/D126068
2022-04-20[clang] NFCI: Use DirectoryEntryRef in FrontendAction::BeginSourceFile()Jan Svoboda1-2/+2
This patch removes use of the deprecated `DirectoryEntry::getName()` from `FrontendAction::BeginSourceFile()`. Reviewed By: bnbarham Differential Revision: https://reviews.llvm.org/D123853
2022-03-27[C++20][Modules][HU 4/5] Handle pre-processed header units.Iain Sandoe1-0/+15
We wish to support emitting a pre-processed output for an importable header unit, that can be consumed to produce the same header units as the original source. This means that ee need to find the original filename used to produce the re-preprocessed output, so that it can be assigned as the module name. This is peeked from the first line of the pre-processed source when the action sets up the files. Differential Revision: https://reviews.llvm.org/D121098
2022-03-26[C++20][Modules][HU 2/5] Support searching Header Units in user or system ↵Iain Sandoe1-1/+42
search paths. This is support for the user-facing options to create importable header units from headers in the user or system search paths (or to be given an absolute path). This means that an incomplete header path will be passed by the driver and the lookup carried out using the search paths present when the front end is run. To support this, we introduce file fypes for c++-{user,system,header-unit}-header. These terms are the same as the ones used by GCC, to minimise the differences for tooling (and users). The preprocessor checks for headers before issuing a warning for "#pragma once" in a header build. We ensure that the importable header units are recognised as headers in order to avoid such warnings. Differential Revision: https://reviews.llvm.org/D121096
2022-03-01[clang] Improve laziness of resolving module map headers.Adam Czachorowski1-1/+1
clang has support for lazy headers in module maps - if size and/or modtime and provided in the cppmap file, headers are only resolved when an include directive for a file with that size/modtime is encoutered. Before this change, the lazy resolution was all-or-nothing per module. That means as soon as even one file in that module potentially matched an include, all lazy files in that module were resolved. With this change, only files with matching size/modtime will be resolved. The goal is to avoid unnecessary stat() calls on non-included files, which is especially valuable on networked file systems, with higher latency. Differential Revision: https://reviews.llvm.org/D120569
2022-02-23[clang][modules] Infer framework modules in explicit buildsJan Svoboda1-0/+9
This patch enables inferring framework modules in explicit builds in all contexts. Until now, inferring framework modules only worked with `-fimplicit-module-maps` due to this block of code: ``` // HeaderSearch::loadFrameworkModule case LMM_InvalidModuleMap: // Try to infer a module map from the framework directory. if (HSOpts->ImplicitModuleMaps) ModMap.inferFrameworkModule(Dir, IsSystem, /*Parent=*/nullptr); break; ``` Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D113880
2021-10-21[clang] Don't clear AST if we have consumers running after the main actionArthur Eubanks1-2/+7
Downstream users may have Clang plugins. By default these plugins run after the main action if they are specified on the command line. Since these plugins are ASTConsumers, presumably they inspect the AST. So we shouldn't clear it if any plugins run after the main action. Reviewed By: dblaikie, hans Differential Revision: https://reviews.llvm.org/D112190
2021-10-20[clang] Add plugin ActionType to run command line plugin before main actionArthur Eubanks1-3/+8
Currently we have a way to run a plugin if specified on the command line after the main action, and ways to unconditionally run the plugin before or after the main action, but no way to run a plugin if specified on the command line before the main action. This introduces the missing option. This is helpful because -clear-ast-before-backend clears the AST before codegen, while some plugins may want access to the AST. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D112096
2021-10-12[clang][modules] NFC: Propagate import `SourceLocation` into ↵Jan Svoboda1-3/+4
`HeaderSearch::lookupModule` This patch propagates the import `SourceLocation` into `HeaderSearch::lookupModule`. This enables remarks on search path usage (implemented in D102923) to point to the source code that initiated header search. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D111557
2021-09-21[NFC] `goto fail` has failed us in the past...Chris Bieneman1-30/+35
This patch replaces reliance on `goto failure` pattern with `llvm::scope_exit`. Reviewed By: bkramer Differential Revision: https://reviews.llvm.org/D109865
2021-05-17[clang][modules] Build inferred modulesMichael Spencer1-7/+9
This patch enables explicitly building inferred modules. Effectively a cherry-pick of https://github.com/apple/llvm-project/pull/699 authored by @Bigcheese with libclang and dependency scanner changes omitted. Contains the following changes: 1. [Clang] Fix the header paths in clang::Module for inferred modules. * The UmbrellaAsWritten and NameAsWritten fields in clang::Module are a lie for framework modules. For those they actually are the path to the header or umbrella relative to the clang::Module::Directory. * The exception to this case is for inferred modules. Here it actually is the name as written, because we print out the module and read it back in when implicitly building modules. This causes a problem when explicitly building an inferred module, as we skip the printing out step. * In order to fix this issue this patch adds a new field for the path we want to use in getInputBufferForModule. It also makes NameAsWritten actually be the name written in the module map file (or that would be, in the case of an inferred module). 2. [Clang] Allow explicitly building an inferred module. * Building the actual module still fails, but make sure it fails for the right reason. Split from D100934. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D102491
2021-05-13[clang-repl] Recommit "Land initial infrastructure for incremental parsing"Vassil Vassilev1-0/+1
Original commit message: In http://lists.llvm.org/pipermail/llvm-dev/2020-July/143257.html we have mentioned our plans to make some of the incremental compilation facilities available in llvm mainline. This patch proposes a minimal version of a repl, clang-repl, which enables interpreter-like interaction for C++. For instance: ./bin/clang-repl clang-repl> int i = 42; clang-repl> extern "C" int printf(const char*,...); clang-repl> auto r1 = printf("i=%d\n", i); i=42 clang-repl> quit The patch allows very limited functionality, for example, it crashes on invalid C++. The design of the proposed patch follows closely the design of cling. The idea is to gather feedback and gradually evolve both clang-repl and cling to what the community agrees upon. The IncrementalParser class is responsible for driving the clang parser and codegen and allows the compiler infrastructure to process more than one input. Every input adds to the “ever-growing” translation unit. That model is enabled by an IncrementalAction which prevents teardown when HandleTranslationUnit. The IncrementalExecutor class hides some of the underlying implementation details of the concrete JIT infrastructure. It exposes the minimal set of functionality required by our incremental compiler/interpreter. The Transaction class keeps track of the AST and the LLVM IR for each incremental input. That tracking information will be later used to implement error recovery. The Interpreter class orchestrates the IncrementalParser and the IncrementalExecutor to model interpreter-like behavior. It provides the public API which can be used (in future) when using the interpreter library. Differential revision: https://reviews.llvm.org/D96033
2021-05-13Revert "[clang-repl] Land initial infrastructure for incremental parsing"Vassil Vassilev1-1/+0
This reverts commit 44a4000181e1a25027e87f2ae4e71cb876a7a275. We are seeing build failures due to missing dependency to libSupport and CMake Error at tools/clang/tools/clang-repl/cmake_install.cmake file INSTALL cannot find
2021-05-13[clang-repl] Land initial infrastructure for incremental parsingVassil Vassilev1-0/+1
In http://lists.llvm.org/pipermail/llvm-dev/2020-July/143257.html we have mentioned our plans to make some of the incremental compilation facilities available in llvm mainline. This patch proposes a minimal version of a repl, clang-repl, which enables interpreter-like interaction for C++. For instance: ./bin/clang-repl clang-repl> int i = 42; clang-repl> extern "C" int printf(const char*,...); clang-repl> auto r1 = printf("i=%d\n", i); i=42 clang-repl> quit The patch allows very limited functionality, for example, it crashes on invalid C++. The design of the proposed patch follows closely the design of cling. The idea is to gather feedback and gradually evolve both clang-repl and cling to what the community agrees upon. The IncrementalParser class is responsible for driving the clang parser and codegen and allows the compiler infrastructure to process more than one input. Every input adds to the “ever-growing” translation unit. That model is enabled by an IncrementalAction which prevents teardown when HandleTranslationUnit. The IncrementalExecutor class hides some of the underlying implementation details of the concrete JIT infrastructure. It exposes the minimal set of functionality required by our incremental compiler/interpreter. The Transaction class keeps track of the AST and the LLVM IR for each incremental input. That tracking information will be later used to implement error recovery. The Interpreter class orchestrates the IncrementalParser and the IncrementalExecutor to model interpreter-like behavior. It provides the public API which can be used (in future) when using the interpreter library. Differential revision: https://reviews.llvm.org/D96033
2021-01-21[ASTReader] Allow controlling separately whether validation should be ↵Argyrios Kyrtzidis1-3/+3
disabled for a PCH vs a module file This addresses an issue with how the PCH preable works, specifically: 1. When using a PCH/preamble the module hash changes and a different cache directory is used 2. When the preamble is used, PCH & PCM validation is disabled. Due to combination of #1 and #2, reparsing with preamble enabled can end up loading a stale module file before a header change and using it without updating it because validation is disabled and it doesn’t check that the header has changed and the module file is out-of-date. rdar://72611253 Differential Revision: https://reviews.llvm.org/D95159
2020-12-14Revert "Lex: Migrate HeaderSearch::LoadedModuleMaps to FileEntryRef"Nico Weber1-3/+3
This reverts commit a40db5502b2515a6f2f1676b5d7a655ae0f41179. and follow-up d636b881bb9214938973098a012fad453082c444 Somewhat speculative, likely broke check-clang on Windows: https://reviews.llvm.org/D92975#2453482
2020-12-14Lex: Migrate HeaderSearch::LoadedModuleMaps to FileEntryRefDuncan P. N. Exon Smith1-3/+3
Migrate `HeaderSearch::LoadedModuleMaps` and a number of APIs over to `FileEntryRef`. This should have no functionality change. Note that two `FileEntryRef`s hash the same if they point at the same `FileEntry`. Differential Revision: https://reviews.llvm.org/D92975
2020-10-20clang/Frontend: Use MemoryBufferRef in FrontendInputFile (and remove ↵Duncan P. N. Exon Smith1-1/+1
SourceManager::getBuffer) In order to drop the final callers to `SourceManager::getBuffer`, change `FrontendInputFile` to use `Optional<MemoryBufferRef>`. Also updated the "unowned" version of `SourceManager::createFileID` to take a `MemoryBufferRef` (it now calls `MemoryBuffer::getMemBuffer`, which creates a `MemoryBuffer` that does not own the buffer data). Differential Revision: https://reviews.llvm.org/D89427
2020-10-19Lexer: Update the Lexer to use MemoryBufferRef, NFCDuncan P. N. Exon Smith1-4/+3
Update `Lexer` / `Lexer::Lexer` to use `MemoryBufferRef` instead of `MemoryBuffer*`. Callers that were acquiring a `MemoryBuffer*` via `SourceManager::getBuffer` were updated, such that if they checked `Invalid` they use `getBufferOrNone` and otherwise `getBufferOrFake`. Differential Revision: https://reviews.llvm.org/D89398
2020-10-14clang/Frontend: Mostly stop using SourceManager::getBuffer, NFCDuncan P. N. Exon Smith1-1/+1
Update clang/lib/Frontend to use a `MemoryBufferRef` from `getBufferOrFake` instead of `MemoryBuffer*` from `getBuffer`, with the exception of `FrontendInputFile`, which I'm leaving for later. Differential Revision: https://reviews.llvm.org/D89409
2020-08-05[clang][nearly-NFC] Remove some superfluous uses of NamedDecl::getNameAsStringBruno Ricci1-1/+1
`OS << ND->getDeclName();` is equivalent to `OS << ND->getNameAsString();` without the extra temporary string. This is not quite a NFC since two uses of `getNameAsString` in a diagnostic are replaced, which results in the named entity being quoted with additional "'"s (ie: 'var' instead of var).
2020-06-19[NFC] Refactor Registry loops to range forNathan James1-16/+13
2020-04-21Reapply: Make header inclusion order from umbrella dirs deterministicBruno Cardoso Lopes1-3/+16
Sort the headers by name before adding the includes in collectModuleHeaderIncludes. This makes the include order for building umbrellas deterministic across different filesystems and also guarantees that the ASTWriter always dump top headers in the same order. There's currently no good way to test for this behavior. This was first introduced in r289478 and reverted few times because of ASANifed test failures on open source bots (both from LLVM and Swift). Finally reproduced the problem in a Linux machine and use std::sort as a fix, since we are not dealing with POD-like types. rdar://problem/28116411
2020-04-06Fix a typo in an assert message; NFC.BoYao Zhang1-1/+1
2020-03-31Forward WrapperFrontendAction::shouldEraseOutputFiles()Ben Langmuir1-0/+3
Per the documentation, this class is supposed to forward every virtual method, but we had missed on (shouldEraseOutputFiles). This fixes using a wrapped frontend action over the PCH generator when using -fallow-pch-with-compiler-errors. I do not think any upstream wrapper actions can test this. Differential Revision: https://reviews.llvm.org/D77180 rdar://61110294