[llvm] Fix crash when alloc functions are missing `alloc-family` (PR #138310)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri May 2 13:15:58 PDT 2025


================
@@ -3302,14 +3302,16 @@ static bool isAllocSiteRemovable(Instruction *AI,
 
         if (getFreedOperand(cast<CallBase>(I), &TLI) == PI &&
----------------
nikic wrote:

I'd prefer to add a `Family &&` here. No need to do the other checks if we don't have an allocation family in the first place.

https://github.com/llvm/llvm-project/pull/138310


More information about the llvm-commits mailing list