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:
parent
9cad2a10b4
commit
9d4207dbaf
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user