aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/InlineSimple.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-07-07 19:24:15 +0000
committerChris Lattner <sabre@nondot.org>2001-07-07 19:24:15 +0000
commita41f50dea8573e4a610b5aa5e45b5c368559b084 (patch)
tree4e4bc17fa7fffd16e0f99e9229015ca6654ef802 /lib/Transforms/IPO/InlineSimple.cpp
parent30f24a402c27919e4809f6a54ec4046a921a889f (diff)
Broad superficial changes:
* Renamed getOpcode to getOpcodeName * Changed getOpcodeName to return a const char * instead of string * Added a getOpcode method to replace getInstType * Changed code to use getOpcode instead of getInstType git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/InlineSimple.cpp')
-rw-r--r--lib/Transforms/IPO/InlineSimple.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/IPO/InlineSimple.cpp b/lib/Transforms/IPO/InlineSimple.cpp
index de76dcd52d..b7cefacaf3 100644
--- a/lib/Transforms/IPO/InlineSimple.cpp
+++ b/lib/Transforms/IPO/InlineSimple.cpp
@@ -63,7 +63,7 @@ static inline void RemapInstruction(Instruction *I,
// method by one level.
//
bool opt::InlineMethod(BasicBlock::iterator CIIt) {
- assert((*CIIt)->getInstType() == Instruction::Call &&
+ assert((*CIIt)->getOpcode() == Instruction::Call &&
"InlineMethod only works on CallInst nodes!");
assert((*CIIt)->getParent() && "Instruction not embedded in basic block!");
assert((*CIIt)->getParent()->getParent() && "Instruction not in method!");
@@ -149,7 +149,7 @@ bool opt::InlineMethod(BasicBlock::iterator CIIt) {
}
// Copy over the terminator now...
- switch (TI->getInstType()) {
+ switch (TI->getOpcode()) {
case Instruction::Ret: {
const ReturnInst *RI = (const ReturnInst*)TI;
@@ -209,7 +209,7 @@ bool opt::InlineMethod(BasicBlock::iterator CIIt) {
// block of the inlined method.
//
TerminatorInst *Br = OrigBB->getTerminator();
- assert(Br && Br->getInstType() == Instruction::Br &&
+ assert(Br && Br->getOpcode() == Instruction::Br &&
"splitBasicBlock broken!");
Br->setOperand(0, ValueMap[CalledMeth->front()]);
@@ -249,7 +249,7 @@ static inline bool ShouldInlineMethod(const CallInst *CI, const Method *M) {
static inline bool DoMethodInlining(BasicBlock *BB) {
for (BasicBlock::iterator I = BB->begin(); I != BB->end(); ++I) {
- if ((*I)->getInstType() == Instruction::Call) {
+ if ((*I)->getOpcode() == Instruction::Call) {
// Check to see if we should inline this method
CallInst *CI = (CallInst*)*I;
Method *M = CI->getCalledMethod();