1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

Provide more information in the error message that occurs when there are

unresolved constants remaining.

llvm-svn: 18502
This commit is contained in:
Reid Spencer 2004-12-04 22:19:53 +00:00
parent 5c0c2c389c
commit 8cddd97526

View File

@ -1571,8 +1571,16 @@ void BytecodeReader::ParseConstantPool(ValueTable &Tab,
// After we have finished parsing the constant pool, we had better not have
// any dangling references left.
if (!ConstantFwdRefs.empty())
error("Unresolved constant references exist!");
if (!ConstantFwdRefs.empty()) {
typedef std::map<std::pair<const Type*,unsigned>, Constant*> ConstantRefsType;
ConstantRefsType::const_iterator I = ConstantFwdRefs.begin();
const Type* missingType = I->first.first;
Constant* missingConst = I->second;
error(utostr(ConstantFwdRefs.size()) +
" unresolved constant reference exist. First one is '" +
missingConst->getName() + "' of type '" +
missingType->getDescription() + "'.");
}
checkPastBlockEnd("Constant Pool");
if (Handler) Handler->handleGlobalConstantsEnd();