diff --git a/lib/VMCore/Mangler.cpp b/lib/VMCore/Mangler.cpp index 6e838e395cb..a01f0f1540e 100644 --- a/lib/VMCore/Mangler.cpp +++ b/lib/VMCore/Mangler.cpp @@ -129,10 +129,8 @@ std::string Mangler::makeNameProper(const std::string &X, const char *Prefix, } std::string Mangler::getValueName(const GlobalValue *GV, const char *Suffix) { - // Never mangle intrinsic functions. - // FIXME: These should never come into the mangler. - if (isa(GV) && cast(GV)->isIntrinsic()) - return GV->getNameStart(); + assert((!isa(GV) || !cast(GV)->isIntrinsic()) && + "Intrinsic functions cannot be mangled by Mangler"); if (GV->hasName()) { if (GV->hasPrivateLinkage())