mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-01 12:46:09 +00:00
[Memprof] Fix a warning
This patch fixes: llvm/lib/ProfileData/MemProfReader.cpp:685:1: error: non-void function does not return a value in all con trol paths [-Werror,-Wreturn-type] While I am at it, this patch removes an else-after-return.
This commit is contained in:
parent
d058b51604
commit
22b36bfa3f
@ -677,11 +677,10 @@ llvm::SmallVector<std::pair<uint64_t, MemInfoBlock>>
|
||||
RawMemProfReader::readMemInfoBlocks(const char *Ptr) {
|
||||
if (MemprofRawVersion == 3ULL)
|
||||
return readMemInfoBlocksV3(Ptr);
|
||||
else if (MemprofRawVersion == 4ULL)
|
||||
if (MemprofRawVersion == 4ULL)
|
||||
return readMemInfoBlocksV4(Ptr);
|
||||
else
|
||||
assert(false &&
|
||||
"Panic: Unsupported version number when reading MemInfoBlocks");
|
||||
llvm_unreachable(
|
||||
"Panic: Unsupported version number when reading MemInfoBlocks");
|
||||
}
|
||||
|
||||
Error RawMemProfReader::readRawProfile(
|
||||
|
Loading…
x
Reference in New Issue
Block a user