aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Bytecode')
-rw-r--r--lib/Bytecode/Reader/Reader.cpp2
-rw-r--r--lib/Bytecode/Writer/Writer.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp
index b1e4bf639c..575b957379 100644
--- a/lib/Bytecode/Reader/Reader.cpp
+++ b/lib/Bytecode/Reader/Reader.cpp
@@ -1403,7 +1403,7 @@ Value *BytecodeReader::ParseConstantPoolValue(unsigned TypeID) {
unsigned Val = read_vbr_uint();
if (Val != 0 && Val != 1)
error("Invalid boolean value read.");
- Result = ConstantBool::get(Val == 1);
+ Result = ConstantInt::get(Val == 1);
if (Handler) Handler->handleConstantValue(Result);
break;
}
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp
index 37e4abfae2..88745ea4b2 100644
--- a/lib/Bytecode/Writer/Writer.cpp
+++ b/lib/Bytecode/Writer/Writer.cpp
@@ -322,7 +322,7 @@ void BytecodeWriter::outputConstant(const Constant *CPV) {
switch (CPV->getType()->getTypeID()) {
case Type::BoolTyID: // Boolean Types
- if (cast<ConstantBool>(CPV)->getValue())
+ if (cast<ConstantInt>(CPV)->getBoolValue())
output_vbr(1U);
else
output_vbr(0U);