mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-26 23:32:58 +00:00
Add debugging to make a more useful message if a value gets constructed with a null type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1443 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4adc20b41c
commit
82d18aa0e4
@ -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…
x
Reference in New Issue
Block a user