From 6052eef8bd701b30a0ab5749296671ca34389c39 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Sun, 1 Apr 2012 10:21:05 +0000 Subject: 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 --- lib/Transforms/IPO/InlineAlways.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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(CS.getInstruction())->canReturnTwice()) return false; } -- cgit v1.2.3-18-g5258