diff options
author | Manuel Jacob <me@manueljacob.de> | 2016-01-05 23:59:08 +0000 |
---|---|---|
committer | Manuel Jacob <me@manueljacob.de> | 2016-01-05 23:59:08 +0000 |
commit | 3eedd113291fa604adae3c898406e9efa2471701 (patch) | |
tree | aab83d5f06dda48dd0bbe839067c28b6308ce031 /llvm/lib/Transforms/Utils/Local.cpp | |
parent | aac97c93ac156a23e07d2acf5a1345aeea073cdb (diff) | |
download | bcm5719-llvm-3eedd113291fa604adae3c898406e9efa2471701.tar.gz bcm5719-llvm-3eedd113291fa604adae3c898406e9efa2471701.zip |
[Statepoints] Check for the "gc-leaf-function" attribute on call sites as well.
Reviewers: sanjoy, reames
Subscribers: sanjoy, llvm-commits
Differential Revision: http://reviews.llvm.org/D15900
llvm-svn: 256875
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 3f46c5ebf45..0e386ac83e9 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -1553,8 +1553,8 @@ bool llvm::callsGCLeafFunction(ImmutableCallSite CS) { return true; // Check if the function is specifically marked as a gc leaf function. - // - // TODO: we should be checking the attributes on the call site as well. + if (CS.hasFnAttr("gc-leaf-function")) + return true; if (const Function *F = CS.getCalledFunction()) return F->hasFnAttribute("gc-leaf-function"); |