aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Reader/ConstantReader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Bytecode/Reader/ConstantReader.cpp')
-rw-r--r--lib/Bytecode/Reader/ConstantReader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Bytecode/Reader/ConstantReader.cpp b/lib/Bytecode/Reader/ConstantReader.cpp
index b85bd887ef..dd47d1c2cf 100644
--- a/lib/Bytecode/Reader/ConstantReader.cpp
+++ b/lib/Bytecode/Reader/ConstantReader.cpp
@@ -156,7 +156,7 @@ bool BytecodeParser::parseConstPoolValue(const uchar *&Buf,
unsigned Slot;
if (read_vbr(Buf, EndBuf, Slot)) return true;
Value *V = getValue(AT->getElementType(), Slot, false);
- if (!V || V->getValueType() != Value::ConstantVal)
+ if (!V || !V->isConstant())
return true;
Elements.push_back((ConstPoolVal*)V);
}
@@ -173,7 +173,7 @@ bool BytecodeParser::parseConstPoolValue(const uchar *&Buf,
unsigned Slot;
if (read_vbr(Buf, EndBuf, Slot)) return true;
Value *V = getValue(ET[i], Slot, false);
- if (!V || V->getValueType() != Value::ConstantVal)
+ if (!V || !V->isConstant())
return true;
Elements.push_back((ConstPoolVal*)V);
}