Add accessor
[oota-llvm.git] / include / llvm / Support / CallSite.h
index 066572efde847198daca2983ba5a968a10335a20..5a5920962ecabf34d3c30f386d496fcb11cc37f9 100644 (file)
@@ -16,8 +16,14 @@ class InvokeInst;
 class CallSite {
   Instruction *I;
 public:
+  CallSite() : I(0) {}
   CallSite(CallInst *CI) : I((Instruction*)CI) {}
   CallSite(InvokeInst *II) : I((Instruction*)II) {}
+  CallSite(const CallSite &CS) : I(CS.I) {}
+  CallSite &operator=(const CallSite &CS) { I = CS.I; return *this; }
+
+  /// getInstruction - Return the instruction this call site corresponds to
+  Instruction *getInstruction() const { return I; }
 
   /// getCalledValue - Return the pointer to function that is being called...
   ///