projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4adc20b
)
Add debugging to make a more useful message if a value gets constructed with a null...
author
Chris Lattner
<sabre@nondot.org>
Thu, 13 Dec 2001 00:41:27 +0000
(
00:41
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 13 Dec 2001 00:41:27 +0000
(
00:41
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1443
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Value.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Value.cpp
b/lib/VMCore/Value.cpp
index 3429d7c3b38a4a0c30a5338e851eea3b32d1d125..0ac7205104326a666ef3025fa44afbc9244f4c4c 100644
(file)
--- a/
lib/VMCore/Value.cpp
+++ b/
lib/VMCore/Value.cpp
@@
-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;
}