diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-10-17 18:43:40 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-10-17 18:43:40 +0000 |
commit | 63a4ea185965b3278fb07b7b865910eb18ee83ad (patch) | |
tree | d4469cba160af830b117b8b8075ed7197f613e03 /llvm/lib/Analysis/InlineCost.cpp | |
parent | 975bfc9b45ef7384a4d744fb5f7fdf61325001bf (diff) | |
download | bcm5719-llvm-63a4ea185965b3278fb07b7b865910eb18ee83ad.tar.gz bcm5719-llvm-63a4ea185965b3278fb07b7b865910eb18ee83ad.zip |
Correct over-zealous removal of hack.
Some code want to check that *any* call within a function has the 'returns
twice' attribute, not just that the current function has one.
llvm-svn: 142221
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r-- | llvm/lib/Analysis/InlineCost.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp index 65db33cdc4d..40ac9a211af 100644 --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/lib/Analysis/InlineCost.cpp @@ -229,7 +229,7 @@ void CodeMetrics::analyzeFunction(Function *F, const TargetData *TD) { // _setjmp), never inline it. This is a hack because we depend on the user // marking their local variables as volatile if they are live across a setjmp // call, and they probably won't do this in callers. - callsSetJmp = F->hasFnAttr(Attribute::ReturnsTwice); + callsSetJmp = F->callsFunctionThatReturnsTwice(); // Look at the size of the callee. for (Function::const_iterator BB = F->begin(), E = F->end(); BB != E; ++BB) |