aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/VMCore/Value.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp
index d14d1656a4..79521f6845 100644
--- a/lib/VMCore/Value.cpp
+++ b/lib/VMCore/Value.cpp
@@ -36,6 +36,8 @@ Value::Value(const Type *ty, unsigned scid, const std::string &name)
assert((Ty->isFirstClassType() || Ty == Type::VoidTy ||
isa<OpaqueType>(ty)) &&
"Cannot create non-first-class values except for constants!");
+ if (ty == Type::VoidTy)
+ assert(name == "" && "Cannot have named void values!");
}
Value::~Value() {