[llvm-branch-commits] [llvm] llvm-reduce: Change function return types if function is not called (PR #134035)
    Florian Hahn via llvm-branch-commits 
    llvm-branch-commits at lists.llvm.org
       
    Tue Apr  8 02:00:48 PDT 2025
    
    
  
================
@@ -55,8 +57,10 @@ static void rewriteFuncWithReturnType(Function &OldF, Value *NewRetValue) {
   BasicBlock::iterator NewValIt =
       NewRetI ? NewRetI->getIterator() : EntryBB.end();
 
+  Type *OldRetTy = OldFuncTy->getReturnType();
+
   // Hack up any return values in other blocks, we can't leave them as ret void.
----------------
fhahn wrote:
Comment needs updating?
```suggestion
  // Hack up any return values in other blocks, we can't leave them as returning OldRetTy.
```
https://github.com/llvm/llvm-project/pull/134035
    
    
More information about the llvm-branch-commits
mailing list