[llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y
Chris Lattner
lattner at cs.uiuc.edu
Sun Nov 28 08:46:01 PST 2004
Changes in directory llvm/lib/AsmParser:
llvmAsmParser.y updated: 1.206 -> 1.207
---
Log message:
Fix PR463: http://llvm.cs.uiuc.edu/PR463
---
Diffs of the changes: (+4 -1)
Index: llvm/lib/AsmParser/llvmAsmParser.y
diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.206 llvm/lib/AsmParser/llvmAsmParser.y:1.207
--- llvm/lib/AsmParser/llvmAsmParser.y:1.206 Tue Oct 26 13:26:14 2004
+++ llvm/lib/AsmParser/llvmAsmParser.y Sun Nov 28 10:45:45 2004
@@ -1294,7 +1294,10 @@
delete $1;
}
| Types ZEROINITIALIZER {
- $$ = Constant::getNullValue($1->get());
+ const Type *Ty = $1->get();
+ if (isa<FunctionType>(Ty) || Ty == Type::LabelTy || isa<OpaqueType>(Ty))
+ ThrowException("Cannot create a null initialized value of this type!");
+ $$ = Constant::getNullValue(Ty);
delete $1;
};
More information about the llvm-commits
mailing list