================
@@ -437,14 +474,35 @@ Error llvm::timeTraceProfilerWrite(StringRef
PreferredFileName,
if (Path.empty()) {
Path = FallbackFileName == "-" ? "out" : FallbackFileName.str();
Path += TimeTraceFileExtension;
+ if (TimeTraceProfilerInstance->TimeTraceCompress ==
----------------
alinas wrote:
I find this section confusing, because it makes it look like you could update
CompressType when the path is empty and I *think* that shouldn't happen?
Does the following make sense:
```
DebugCompressionType CompressType =
TimeTraceProfilerInstance->TimeTraceCompress;
if (Path.empty()) {
Path = FallbackFileName == "-" ? "out" : FallbackFileName.str();
Path += TimeTraceFileExtension;
if (CompressType == DebugCompressionType::Zstd)
Path += ".zst";
} else if (CompressType == DebugCompressionType::None) {
CompressType = inferTimeTraceCompressionFromPath(Path);
}
if (CompressType != DebugCompressionType::None) {
[...]
```
https://github.com/llvm/llvm-project/pull/228627
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits