diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-04-01 10:21:05 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-04-01 10:21:05 +0000 |
commit | 6052eef8bd701b30a0ab5749296671ca34389c39 (patch) | |
tree | 829e0a222fd59a3cdea969cd34a8e1e43bea8a8b /lib | |
parent | 0b42f9dd2fb166190c7ebd9b6e6925f59db4f205 (diff) |
Fix a pretty scary bug I introduced into the always inliner with
a single missing character. Somehow, this had gone untested. I've added
tests for returns-twice logic specifically with the always-inliner that
would have caught this, and fixed the bug.
Thanks to Matt for the careful review and spotting this!!! =D
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153832 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/IPO/InlineAlways.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/InlineAlways.cpp b/lib/Transforms/IPO/InlineAlways.cpp index a977027eed..664ddf6f7a 100644 --- a/lib/Transforms/IPO/InlineAlways.cpp +++ b/lib/Transforms/IPO/InlineAlways.cpp @@ -83,7 +83,7 @@ static bool isInlineViable(Function &F) { // Disallow calls which expose returns-twice to a function not previously // attributed as such. - if (ReturnsTwice && CS.isCall() && + if (!ReturnsTwice && CS.isCall() && cast<CallInst>(CS.getInstruction())->canReturnTwice()) return false; } |