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 | 3c5e60994f53eef2808a33b5ca6c3dffc2168054 (patch) | |
tree | f77554018088b20adc18a5aca234db259071c838 /lib/Analysis | |
parent | 8f3af87e99b9556224480f1aa18d340fb343bbf6 (diff) | |
download | external_llvm-3c5e60994f53eef2808a33b5ca6c3dffc2168054.zip external_llvm-3c5e60994f53eef2808a33b5ca6c3dffc2168054.tar.gz external_llvm-3c5e60994f53eef2808a33b5ca6c3dffc2168054.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142221 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/InlineCost.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/InlineCost.cpp b/lib/Analysis/InlineCost.cpp index 65db33c..40ac9a2 100644 --- a/lib/Analysis/InlineCost.cpp +++ b/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) |