aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 71417bf..1052bd4 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -5968,10 +5968,11 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
} else {
ResTypeID = getContainedTypeID(OpTypeID);
Ty = getTypeByID(ResTypeID);
- if (!Ty)
- return error("Missing element type for old-style load");
}
+ if (!Ty)
+ return error("Missing load type");
+
if (Error Err = typeCheckLoadStoreInst(Ty, Op->getType()))
return Err;
@@ -6006,10 +6007,11 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
} else {
ResTypeID = getContainedTypeID(OpTypeID);
Ty = getTypeByID(ResTypeID);
- if (!Ty)
- return error("Missing element type for old style atomic load");
}
+ if (!Ty)
+ return error("Missing atomic load type");
+
if (Error Err = typeCheckLoadStoreInst(Ty, Op->getType()))
return Err;