summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Instructions.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-02-18 17:32:13 +0000
committerDuncan Sands <baldrick@free.fr>2008-02-18 17:32:13 +0000
commit85fab3a3ad55e20171b4081d47e764cd44a99009 (patch)
treefbbd408a5fb824bbe5914ad1b08046afe5362b32 /llvm/lib/VMCore/Instructions.cpp
parent8ed77c41d874534d6a31a00ff2cd5c60c75afadd (diff)
downloadbcm5719-llvm-85fab3a3ad55e20171b4081d47e764cd44a99009.tar.gz
bcm5719-llvm-85fab3a3ad55e20171b4081d47e764cd44a99009.zip
Simplify caller updating using a CallSite, as
requested by Chris. While there, do the same for an existing function committed by someone called "lattner" :) llvm-svn: 47273
Diffstat (limited to 'llvm/lib/VMCore/Instructions.cpp')
-rw-r--r--llvm/lib/VMCore/Instructions.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp
index b945a5a0dd7..1a4a5ce7258 100644
--- a/llvm/lib/VMCore/Instructions.cpp
+++ b/llvm/lib/VMCore/Instructions.cpp
@@ -27,6 +27,10 @@ using namespace llvm;
// CallSite Class
//===----------------------------------------------------------------------===//
+CallSite::CallSite(Instruction *C) {
+ assert((isa<CallInst>(C) || isa<InvokeInst>(C)) && "Not a call!");
+ I = C;
+}
unsigned CallSite::getCallingConv() const {
if (CallInst *CI = dyn_cast<CallInst>(I))
return CI->getCallingConv();
OpenPOWER on IntegriCloud