From: Alkis Evlogimenos Date: Sun, 25 Jul 2004 06:07:15 +0000 (+0000) Subject: Disallow creation of named values of type void. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=83949fcf7c3e417a73f2bb3e6c78a74274407099;p=oota-llvm.git Disallow creation of named values of type void. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15190 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp index d14d1656a47..79521f6845a 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(ty)) && "Cannot create non-first-class values except for constants!"); + if (ty == Type::VoidTy) + assert(name == "" && "Cannot have named void values!"); } Value::~Value() {