diff options
Diffstat (limited to 'llvm/lib/IR/AsmWriter.cpp')
-rw-r--r-- | llvm/lib/IR/AsmWriter.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp index 36f4f3aa876..a5dc623e1a3 100644 --- a/llvm/lib/IR/AsmWriter.cpp +++ b/llvm/lib/IR/AsmWriter.cpp @@ -36,7 +36,6 @@ #include "llvm/IR/Attributes.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/CFG.h" -#include "llvm/IR/CallSite.h" #include "llvm/IR/CallingConv.h" #include "llvm/IR/Comdat.h" #include "llvm/IR/Constant.h" @@ -998,9 +997,9 @@ void SlotTracker::processFunction() { // We allow direct calls to any llvm.foo function here, because the // target may not be linked into the optimizer. - if (auto CS = ImmutableCallSite(&I)) { + if (const auto *Call = dyn_cast<CallBase>(&I)) { // Add all the call attributes to the table. - AttributeSet Attrs = CS.getAttributes().getFnAttributes(); + AttributeSet Attrs = Call->getAttributes().getFnAttributes(); if (Attrs.hasAttributes()) CreateAttributeSetSlot(Attrs); } @@ -2359,7 +2358,7 @@ public: void writeOperand(const Value *Op, bool PrintType); void writeParamOperand(const Value *Operand, AttributeSet Attrs); - void writeOperandBundles(ImmutableCallSite CS); + void writeOperandBundles(const CallBase *Call); void writeSyncScope(const LLVMContext &Context, SyncScope::ID SSID); void writeAtomic(const LLVMContext &Context, @@ -2510,15 +2509,15 @@ void AssemblyWriter::writeParamOperand(const Value *Operand, WriteAsOperandInternal(Out, Operand, &TypePrinter, &Machine, TheModule); } -void AssemblyWriter::writeOperandBundles(ImmutableCallSite CS) { - if (!CS.hasOperandBundles()) +void AssemblyWriter::writeOperandBundles(const CallBase *Call) { + if (!Call->hasOperandBundles()) return; Out << " [ "; bool FirstBundle = true; - for (unsigned i = 0, e = CS.getNumOperandBundles(); i != e; ++i) { - OperandBundleUse BU = CS.getOperandBundleAt(i); + for (unsigned i = 0, e = Call->getNumOperandBundles(); i != e; ++i) { + OperandBundleUse BU = Call->getOperandBundleAt(i); if (!FirstBundle) Out << ", "; |