Skip to content

Commit 00c2235

Browse files
committed
[IR] Fix -Wreturn-type after D135714 "[MemProf] ThinLTO summary support"
1 parent 77533d7 commit 00c2235

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

llvm/lib/IR/AsmWriter.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3197,20 +3197,16 @@ void AssemblyWriter::printFunctionSummary(const FunctionSummary *FS) {
31973197
// "notcoldandcold" implies there are multiple contexts which reach this site,
31983198
// some of which are cold and some of which are not, and that need to
31993199
// disambiguate via cloning or other context identification.
3200-
auto AllocTypeName = [](uint8_t Type) {
3200+
auto AllocTypeName = [](uint8_t Type) -> const char * {
32013201
switch (Type) {
32023202
case (uint8_t)AllocationType::None:
32033203
return "none";
3204-
break;
32053204
case (uint8_t)AllocationType::NotCold:
32063205
return "notcold";
3207-
break;
32083206
case (uint8_t)AllocationType::Cold:
32093207
return "cold";
3210-
break;
32113208
case (uint8_t)AllocationType::NotCold | (uint8_t)AllocationType::Cold:
32123209
return "notcoldandcold";
3213-
break;
32143210
}
32153211
llvm_unreachable("Unexpected alloc type");
32163212
};

0 commit comments

Comments
 (0)