Disallow creation of named values of type void.

llvm-svn: 15190
diff --git a/llvm/lib/VMCore/Value.cpp b/llvm/lib/VMCore/Value.cpp
index d14d165..79521f6 100644
--- a/llvm/lib/VMCore/Value.cpp
+++ b/llvm/lib/VMCore/Value.cpp
@@ -36,6 +36,8 @@
     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() {