[llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y
Chris Lattner
lattner at cs.uiuc.edu
Tue Mar 22 17:29:42 PST 2005
Changes in directory llvm/lib/AsmParser:
llvmAsmParser.y updated: 1.217 -> 1.218
---
Log message:
don't crash in some bad cases.
---
Diffs of the changes: (+3 -0)
llvmAsmParser.y | 3 +++
1 files changed, 3 insertions(+)
Index: llvm/lib/AsmParser/llvmAsmParser.y
diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.217 llvm/lib/AsmParser/llvmAsmParser.y:1.218
--- llvm/lib/AsmParser/llvmAsmParser.y:1.217 Mon Mar 21 00:27:42 2005
+++ llvm/lib/AsmParser/llvmAsmParser.y Tue Mar 22 19:29:26 2005
@@ -330,6 +330,9 @@
Value *V = getValNonImprovising(Ty, ID);
if (V) return V;
+ if (!Ty->isFirstClassType() && !isa<OpaqueType>(Ty))
+ ThrowException("Invalid use of a composite type!");
+
// If we reached here, we referenced either a symbol that we don't know about
// or an id number that hasn't been read yet. We may be referencing something
// forward, so just create an entry to be resolved later and get to it...
More information about the llvm-commits
mailing list