Skip to content

Commit 5ff3cf8

Browse files
authored
[Comgr] Add -fcoverage-compilation-dir= flag to the cache's ignored flags (llvm#3416)
2 parents f999204 + 755e70c commit 5ff3cf8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

amd/comgr/src/comgr-clang-command.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ bool skipProblematicFlag(IteratorTy &It, const IteratorTy &End) {
6868
// Clang always appends the debug compilation dir,
6969
// even without debug info (in comgr it matches the current directory). We
7070
// only consider it if the user specified debug information
71-
bool IsFlagWithSingleArg = Arg.starts_with("-fdebug-compilation-dir=");
71+
const char *FlagsWithEqArg[] = {"-fcoverage-compilation-dir=",
72+
"-fdebug-compilation-dir="};
73+
bool IsFlagWithSingleArg = any_of(
74+
FlagsWithEqArg, [&](const char *Flag) { return Arg.starts_with(Flag); });
7275
if (IsFlagWithSingleArg) {
7376
return true;
7477
}

0 commit comments

Comments
 (0)