Do not call getMangledName on Intrinsics.

llvm-svn: 76842
This commit is contained in:
Sanjiv Gupta 2009-07-23 02:11:04 +00:00
parent 6292003492
commit 56df1e7969
1 changed files with 3 additions and 4 deletions

View File

@ -222,14 +222,13 @@ void PIC16AsmPrinter::EmitFunctionDecls(Module &M) {
// Emit declarations for external functions.
O <<"\n"<<TAI->getCommentString() << "Function Declarations - BEGIN." <<"\n";
for (Module::iterator I = M.begin(), E = M.end(); I != E; I++) {
if (I->isIntrinsic())
continue;
std::string Name = Mang->getMangledName(I);
if (Name.compare("@abort") == 0)
continue;
// If it is llvm intrinsic call then don't emit
if (Name.find("llvm.") != std::string::npos)
continue;
if (!I->isDeclaration() && !I->hasExternalLinkage())
continue;