diff options
author | Chris Lattner <sabre@nondot.org> | 2002-03-11 22:12:39 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-03-11 22:12:39 +0000 |
commit | 749ce032ba2ad79bdbaf89b924f12baebac1d062 (patch) | |
tree | c25e3d253d2507109426c2f210997b5aec307f36 /lib/AsmParser/llvmAsmParser.y | |
parent | 0fce76a009bccfa427575643a2b793fd53e8aff1 (diff) | |
download | external_llvm-749ce032ba2ad79bdbaf89b924f12baebac1d062.zip external_llvm-749ce032ba2ad79bdbaf89b924f12baebac1d062.tar.gz external_llvm-749ce032ba2ad79bdbaf89b924f12baebac1d062.tar.bz2 |
Implement TODO for better diagnostic output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1859 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/llvmAsmParser.y')
-rw-r--r-- | lib/AsmParser/llvmAsmParser.y | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index 8a1cf0a..c317ff3 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -82,10 +82,14 @@ static struct PerModuleInfo { // resolved! // if (!GlobalRefs.empty()) { - // TODO: Make this more detailed! Loop over each undef value and print - // info - ThrowException("TODO: Make better error - Unresolved forward constant " - "references exist!"); + string UndefinedReferences = "Unresolved global references exist:\n"; + + for (GlobalRefsType::iterator I = GlobalRefs.begin(), E =GlobalRefs.end(); + I != E; ++I) { + UndefinedReferences += " " + I->first.first->getDescription() + " " + + I->first.second.getName() + "\n"; + } + ThrowException(UndefinedReferences); } Values.clear(); // Clear out method local definitions |