[compiler-rt] [llvm] [InstrProf] Add debuginfod correlation support (PR #106606)
Ellis Hoag via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 30 18:38:57 PDT 2024
================
@@ -113,11 +115,36 @@ InstrProfCorrelator::get(StringRef Filename, ProfCorrelatorKind FileKind) {
return get(std::move(*BufferOrErr), FileKind);
}
if (FileKind == BINARY) {
- auto BufferOrErr = errorOrToExpected(MemoryBuffer::getFile(Filename));
- if (auto Err = BufferOrErr.takeError())
- return std::move(Err);
+ if (!Filename.empty()) {
+ auto BufferOrErr = errorOrToExpected(MemoryBuffer::getFile(Filename));
+ if (auto Err = BufferOrErr.takeError())
+ return std::move(Err);
+ return get(std::move(*BufferOrErr), FileKind);
+ } else if (BIDFetcher) {
----------------
ellishg wrote:
No need for the `else` since the previous block will return.
https://github.com/llvm/llvm-project/pull/106606
More information about the llvm-commits
mailing list