[llvm] [llvm-cov] Add HTML dark theme support (PR #93080)

Wentao Zhang via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 11:05:40 PDT 2024


whentojump wrote:

@EdJoPaTo It can be reproduced with 

```shell
#!/bin/bash

cat > test.c << EOF
#define FOO(x) (x)

int main(void) {
    return FOO(2);
}
EOF

clang -fprofile-instr-generate -fcoverage-mapping test.c -o test
./test
llvm-profdata merge default.profraw -o default.profdata
llvm-cov show -format=html --show-expansions -instr-profile default.profdata test > output.html
```

It results in 

```html
<span class="region cyan">FOO</span>
```

So I guess it's because of this hardwired background color 

https://github.com/llvm/llvm-project/blob/19cf8deabe1124831164987f1b9bf2f806c0a875/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp#L202-L204

https://github.com/llvm/llvm-project/pull/93080


More information about the llvm-commits mailing list