aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Instructions.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Instructions.h')
-rw-r--r--include/llvm/Instructions.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index 06d0490..a27ce2b 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -467,7 +467,8 @@ public:
//===----------------------------------------------------------------------===//
/// CallInst - This class represents a function call, abstracting a target
-/// machine's calling convention.
+/// machine's calling convention. This class uses the SubClassData field to
+/// indicate whether or not this is a tail call.
///
class CallInst : public Instruction {
CallInst(const CallInst &CI);
@@ -501,6 +502,9 @@ public:
virtual CallInst *clone() const;
bool mayWriteToMemory() const { return true; }
+ bool isTailCall() const { return SubclassData; }
+ void setTailCall(bool isTailCall) { SubclassData = isTailCall; }
+
/// getCalledFunction - Return the function being called by this instruction
/// if it is a direct call. If it is a call through a function pointer,
/// return null.