aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2020-04-27 20:15:59 -0700
committerCraig Topper <craig.topper@gmail.com>2020-04-27 22:17:03 -0700
commita58b62b4a2b96c31b49338b262b609db746449e8 (patch)
treeb8549e279ee3b6dd34c461038f3e9f0e19fc7f33 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent756ba3548cbeef6c18866914fa935ade8b3edf1c (diff)
downloadllvm-a58b62b4a2b96c31b49338b262b609db746449e8.zip
llvm-a58b62b4a2b96c31b49338b262b609db746449e8.tar.gz
llvm-a58b62b4a2b96c31b49338b262b609db746449e8.tar.bz2
[IR] Replace all uses of CallBase::getCalledValue() with getCalledOperand().
This method has been commented as deprecated for a while. Remove it and replace all uses with the equivalent getCalledOperand(). I also made a few cleanups in here. For example, to removes use of getElementType on a pointer when we could just use getFunctionType from the call. Differential Revision: https://reviews.llvm.org/D78882
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index be8307b..0a6741d 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -2775,7 +2775,7 @@ void ModuleBitcodeWriter::writeInstruction(const Instruction &I,
case Instruction::Invoke: {
const InvokeInst *II = cast<InvokeInst>(&I);
- const Value *Callee = II->getCalledValue();
+ const Value *Callee = II->getCalledOperand();
FunctionType *FTy = II->getFunctionType();
if (II->hasOperandBundles())
@@ -2851,7 +2851,7 @@ void ModuleBitcodeWriter::writeInstruction(const Instruction &I,
}
case Instruction::CallBr: {
const CallBrInst *CBI = cast<CallBrInst>(&I);
- const Value *Callee = CBI->getCalledValue();
+ const Value *Callee = CBI->getCalledOperand();
FunctionType *FTy = CBI->getFunctionType();
if (CBI->hasOperandBundles())
@@ -3029,7 +3029,7 @@ void ModuleBitcodeWriter::writeInstruction(const Instruction &I,
Vals.push_back(Flags);
Vals.push_back(VE.getTypeID(FTy));
- pushValueAndType(CI.getCalledValue(), InstID, Vals); // Callee
+ pushValueAndType(CI.getCalledOperand(), InstID, Vals); // Callee
// Emit value #'s for the fixed parameters.
for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i) {