1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Add debugging to make a more useful message if a value gets constructed with a null type

llvm-svn: 1443
This commit is contained in:
Chris Lattner 2001-12-13 00:41:27 +00:00
parent 9cad2a10b4
commit 9d4207dbaf

View File

@ -18,8 +18,13 @@
// Value Class
//===----------------------------------------------------------------------===//
static inline const Type *checkType(const Type *Ty) {
assert(Ty && "Value defined with a null type: Error!");
return Ty;
}
Value::Value(const Type *ty, ValueTy vty, const string &name = "")
: Name(name), Ty(ty, this) {
: Name(name), Ty(checkType(ty), this) {
VTy = vty;
}