@@ -1035,13 +1035,9 @@ BinaryFunction::processIndirectBranch(MCInst &Instruction, unsigned Size,
10351035 return BranchType;
10361036}
10371037
1038- MCSymbol *BinaryFunction::getOrCreateLocalLabel (uint64_t Address,
1039- bool CreatePastEnd) {
1038+ MCSymbol *BinaryFunction::getOrCreateLocalLabel (uint64_t Address) {
10401039 const uint64_t Offset = Address - getAddress ();
10411040
1042- if ((Offset == getSize ()) && CreatePastEnd)
1043- return getFunctionEndLabel ();
1044-
10451041 auto LI = Labels.find (Offset);
10461042 if (LI != Labels.end ())
10471043 return LI->second ;
@@ -1052,6 +1048,9 @@ MCSymbol *BinaryFunction::getOrCreateLocalLabel(uint64_t Address,
10521048 return IslandSym;
10531049 }
10541050
1051+ if (Offset == getSize ())
1052+ return getFunctionEndLabel ();
1053+
10551054 MCSymbol *Label = BC.Ctx ->createNamedTempSymbol ();
10561055 Labels[Offset] = Label;
10571056
@@ -1994,7 +1993,7 @@ void BinaryFunction::postProcessJumpTables() {
19941993 if (IsBuiltinUnreachable) {
19951994 BinaryFunction *TargetBF = BC.getBinaryFunctionAtAddress (EntryAddress);
19961995 MCSymbol *Label = TargetBF ? TargetBF->getSymbol ()
1997- : getOrCreateLocalLabel (EntryAddress, true );
1996+ : getOrCreateLocalLabel (EntryAddress);
19981997 JT.Entries .push_back (Label);
19991998 continue ;
20001999 }
@@ -2005,7 +2004,7 @@ void BinaryFunction::postProcessJumpTables() {
20052004 BC.getBinaryFunctionContainingAddress (EntryAddress);
20062005 MCSymbol *Label;
20072006 if (HasOneParent && TargetBF == this ) {
2008- Label = getOrCreateLocalLabel (EntryAddress, true );
2007+ Label = getOrCreateLocalLabel (EntryAddress);
20092008 } else {
20102009 const uint64_t Offset = EntryAddress - TargetBF->getAddress ();
20112010 Label = Offset ? TargetBF->addEntryPointAtOffset (Offset)
0 commit comments