[all-commits] [llvm/llvm-project] f41ec7: [Clang][Driver] Remove -M group options before gen...
Alexandre Ganea via All-commits
all-commits at lists.llvm.org
Thu Feb 6 13:23:42 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: f41ec709d9d388dc43469e6ac7f51b6313f7e4af
https://github.com/llvm/llvm-project/commit/f41ec709d9d388dc43469e6ac7f51b6313f7e4af
Author: Alexandre Ganea <alexandre.ganea at ubisoft.com>
Date: 2020-02-06 (Thu, 06 Feb 2020)
Changed paths:
M clang/lib/Driver/Compilation.cpp
M clang/test/Driver/output-file-cleanup.c
Log Message:
-----------
[Clang][Driver] Remove -M group options before generating crash diagnostics
Previously, when using '-MF file.d' on the command line, 'file.d' would not be deleted after a compiler crash.
The code path in Compilation::initCompilationForDiagnostics() that was modifying 'TranslatedArgs' had no effect, because 'TCArgs' was already created after the crash.
This was covered by clang/test/Driver/output-file-cleanup.c, the test was succeeding by fluke because Driver::generateCompilationDiagnostics() would fail to launch the subsequent clang -E (see D74070 for a fix for this). So the test was only covering Driver.cpp, C.CleanupFileMap().
After this patch, both cleanup and removal of -MF are exercised.
Differential Revision: https://reviews.llvm.org/D74076
More information about the All-commits
mailing list