From b344a346f1431bc942f96d0e0b8b87ee8f1b0475 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Tue, 27 Jul 2010 22:53:28 +0000 Subject: [PATCH] reintroduce original (asserting) semantics of CallSite(Instruction *II) add instead a CallSite(Value* V) constructor that is consistent with ImmutableCallSize and use that one in client code git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109553 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/CallSite.h | 2 ++ lib/Analysis/MemoryDependenceAnalysis.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/llvm/Support/CallSite.h b/include/llvm/Support/CallSite.h index d21c6ca5757..56f5aa9ca93 100644 --- a/include/llvm/Support/CallSite.h +++ b/include/llvm/Support/CallSite.h @@ -55,6 +55,7 @@ public: CallSiteBase(InstrTy *II) { assert(II && "Null instruction given?"); *this = get(II); + assert(I.getPointer() && "Not a call?"); } /// CallSiteBase::get - This static method is sort of like a constructor. It @@ -293,6 +294,7 @@ class CallSite : public CallSiteBasegetArgOperand(0); // calls to free() erase the entire structure PointerSize = ~0ULL; - } else if (CallSite InstCS = Inst) { + } else if (CallSite InstCS = cast(Inst)) { // Debug intrinsics don't cause dependences. if (isa(Inst)) continue; // If these two calls do not interfere, look past it.