From 30336015ff88298f38841efa1e0dd120e71f2f67 Mon Sep 17 00:00:00 2001 From: Lukas Zaoral Date: Thu, 10 Sep 2020 17:14:42 +0200 Subject: llvm11: Use getCalledOperand instead of getCalledValue CallBase::getCalledValue has been deprecated by getCalledOperand since LLVM 8 and has been removed in LLVM 11 See: https://reviews.llvm.org/D78882 --- lib/Core/StatsTracker.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/Core/StatsTracker.cpp') diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp index a94bad9e..93dfcbfe 100644 --- a/lib/Core/StatsTracker.cpp +++ b/lib/Core/StatsTracker.cpp @@ -797,10 +797,11 @@ void StatsTracker::computeReachableUncovered() { if (isa(inst) || isa(inst)) { #if LLVM_VERSION_CODE >= LLVM_VERSION(8, 0) const CallBase &cs = cast(*inst); + if (isa(cs.getCalledOperand())) { #else const CallSite cs(inst); -#endif if (isa(cs.getCalledValue())) { +#endif // We can never call through here so assume no targets // (which should be correct anyhow). callTargets.insert(std::make_pair(inst, -- cgit 1.4.1