summaryrefslogtreecommitdiff
path: root/lib/CodeGen/StackProtector.cpp
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-08-20 08:56:23 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-08-20 08:56:23 +0000
commitb99272a521ecffe8d021306713bd51fafc85721e (patch)
tree0fe624a24448fabe823d340421d05b02297b4437 /lib/CodeGen/StackProtector.cpp
parentc02dbeb429f3a11f396c3915b638a9a525c97c62 (diff)
downloadllvm-b99272a521ecffe8d021306713bd51fafc85721e.tar.gz
llvm-b99272a521ecffe8d021306713bd51fafc85721e.tar.bz2
llvm-b99272a521ecffe8d021306713bd51fafc85721e.tar.xz
[stackprotector] Added significantly longer comment to FindPotentialTailCall to make clear its relationship to llvm::isInTailCallPosition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188770 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/StackProtector.cpp')
-rw-r--r--lib/CodeGen/StackProtector.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/CodeGen/StackProtector.cpp b/lib/CodeGen/StackProtector.cpp
index b45459a4f6..2cd2219ac9 100644
--- a/lib/CodeGen/StackProtector.cpp
+++ b/lib/CodeGen/StackProtector.cpp
@@ -280,7 +280,12 @@ static bool InstructionWillNotHaveChain(const Instruction *I) {
/// Identify if RI has a previous instruction in the "Tail Position" and return
/// it. Otherwise return 0.
///
-/// This is based off of the code in llvm::isInTailCallPosition
+/// This is based off of the code in llvm::isInTailCallPosition. The difference
+/// is that it inverts the first part of llvm::isInTailCallPosition since
+/// isInTailCallPosition is checking if a call is in a tail call position, and
+/// we are searching for an unknown tail call that might be in the tail call
+/// position. Once we find the call though, the code uses the same refactored
+/// code, returnTypeIsEligibleForTailCall.
static CallInst *FindPotentialTailCall(BasicBlock *BB, ReturnInst *RI,
const TargetLoweringBase *TLI) {
// Establish a reasonable upper bound on the maximum amount of instructions we