[llvm] [lld] [clang] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)
Micah Weston via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 7 12:52:42 PST 2024
================
@@ -719,60 +730,83 @@ decodeBBAddrMapImpl(const ELFFile<ELFT> &EF,
Feature = Data.getU8(Cur); // Feature byte
if (!Cur)
break;
- auto FeatEnableOrErr = PGOAnalysisMap::Features::decode(Feature);
+ auto FeatEnableOrErr = BBAddrMap::Features::decode(Feature);
if (!FeatEnableOrErr)
return FeatEnableOrErr.takeError();
- FeatEnable =
- FeatEnableOrErr ? *FeatEnableOrErr : PGOAnalysisMap::Features{};
+ FeatEnable = FeatEnableOrErr ? *FeatEnableOrErr : BBAddrMap::Features{};
----------------
red1bluelost wrote:
(Nit) I think this can just always assume true given that we return on error in the line before. (woops, I think I wrote this wrong)
```suggestion
FeatEnable = *FeatEnableOrErr;
```
https://github.com/llvm/llvm-project/pull/74128
More information about the llvm-commits
mailing list