aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Bytecode')
-rw-r--r--lib/Bytecode/Reader/InstructionReader.cpp2
-rw-r--r--lib/Bytecode/Reader/Reader.cpp2
-rw-r--r--lib/Bytecode/Writer/InstructionWriter.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/Bytecode/Reader/InstructionReader.cpp b/lib/Bytecode/Reader/InstructionReader.cpp
index 2d28db1b4c..9b98d94530 100644
--- a/lib/Bytecode/Reader/InstructionReader.cpp
+++ b/lib/Bytecode/Reader/InstructionReader.cpp
@@ -345,7 +345,7 @@ bool BytecodeParser::ParseInstruction(const uchar *&Buf, const uchar *EndBuf,
case Instruction::Free:
V = getValue(Raw.Ty, Raw.Arg1);
- if (!V->getType()->isPointerType()) return failure(true);
+ if (!isa<PointerType>(V->getType())) return failure(true);
Res = new FreeInst(V);
return false;
diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp
index 70a6ae97f3..c4ab67f91b 100644
--- a/lib/Bytecode/Reader/Reader.cpp
+++ b/lib/Bytecode/Reader/Reader.cpp
@@ -389,7 +389,7 @@ bool BytecodeParser::ParseModuleGlobalInfo(const uchar *&Buf, const uchar *End,
// VarType Fields: bit0 = isConstant, bit1 = hasInitializer,
// bit2 = isInternal, bit3+ = slot#
const Type *Ty = getType(VarType >> 3);
- if (!Ty || !Ty->isPointerType()) {
+ if (!Ty || !isa<PointerType>(Ty)) {
Error = "Global not pointer type! Ty = " + Ty->getDescription();
return failure(true);
}
diff --git a/lib/Bytecode/Writer/InstructionWriter.cpp b/lib/Bytecode/Writer/InstructionWriter.cpp
index 2c1ce975bc..7ab953cf3c 100644
--- a/lib/Bytecode/Writer/InstructionWriter.cpp
+++ b/lib/Bytecode/Writer/InstructionWriter.cpp
@@ -198,7 +198,7 @@ void BytecodeWriter::processInstruction(const Instruction *I) {
break;
case Instruction::Store:
Ty = I->getOperand(1)->getType(); // Encode the pointer type...
- assert(Ty->isPointerType() && "Store to nonpointer type!?!?");
+ assert(isa<PointerType>(Ty) && "Store to nonpointer type!?!?");
break;
default: // Otherwise use the default behavior...
Ty = NumOperands ? I->getOperand(0)->getType() : I->getType();