X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FIR%2FValue.cpp;h=2c90383edd8c2ecff8e015ac161529f94f216758;hb=ce30a8106d7d33af9c18518c11e808eaeebc2cce;hp=35808a658b411d45b0cbca1b6c290f0702173abe;hpb=59d3ae6cdc4316ad338cd848251f33a236ccb36c;p=oota-llvm.git diff --git a/lib/IR/Value.cpp b/lib/IR/Value.cpp index 35808a658b4..2c90383edd8 100644 --- a/lib/IR/Value.cpp +++ b/lib/IR/Value.cpp @@ -182,6 +182,8 @@ void Value::setName(const Twine &NewName) { SmallString<256> NameData; StringRef NameRef = NewName.toStringRef(NameData); + assert(NameRef.find_first_of(0) == StringRef::npos && + "Null bytes are not allowed in names"); // Name isn't changing? if (getName() == NameRef) @@ -735,9 +737,5 @@ void ValueHandleBase::ValueIsRAUWd(Value *Old, Value *New) { #endif } -// Default implementation for CallbackVH. -void CallbackVH::allUsesReplacedWith(Value *) {} - -void CallbackVH::deleted() { - setValPtr(NULL); -} +// Pin the vtable to this file. +void CallbackVH::anchor() {}