[Partial Inlining] Fix small bug in detecting if we did something
- It's possible for 'Changed' to return as false even if we did
partial inline something. Fixed to accumulate return values
llvm-svn: 338896
diff --git a/llvm/lib/Transforms/IPO/PartialInlining.cpp b/llvm/lib/Transforms/IPO/PartialInlining.cpp
index 4907e4b..709222d 100644
--- a/llvm/lib/Transforms/IPO/PartialInlining.cpp
+++ b/llvm/lib/Transforms/IPO/PartialInlining.cpp
@@ -1461,9 +1461,7 @@
std::pair<bool, Function * > Result = unswitchFunction(CurrFunc);
if (Result.second)
Worklist.push_back(Result.second);
- if (Result.first) {
- Changed = true;
- }
+ Changed |= Result.first;
}
return Changed;