summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-04-01 10:21:05 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-04-01 10:21:05 +0000
commit6052eef8bd701b30a0ab5749296671ca34389c39 (patch)
tree829e0a222fd59a3cdea969cd34a8e1e43bea8a8b /lib
parent0b42f9dd2fb166190c7ebd9b6e6925f59db4f205 (diff)
downloadllvm-6052eef8bd701b30a0ab5749296671ca34389c39.tar.gz
llvm-6052eef8bd701b30a0ab5749296671ca34389c39.tar.bz2
llvm-6052eef8bd701b30a0ab5749296671ca34389c39.tar.xz
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.cpp2
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;
}