the mangler can never mangle intrinsics, don't allow this.

llvm-svn: 75564
This commit is contained in:
Chris Lattner 2009-07-14 00:15:14 +00:00
parent 2976318bb2
commit 05f1976aba
1 changed files with 2 additions and 4 deletions

View File

@ -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<Function>(GV) && cast<Function>(GV)->isIntrinsic())
return GV->getNameStart();
assert((!isa<Function>(GV) || !cast<Function>(GV)->isIntrinsic()) &&
"Intrinsic functions cannot be mangled by Mangler");
if (GV->hasName()) {
if (GV->hasPrivateLinkage())