Module iterator contains list of filescope functions as well, we don't need to emit...
authorSanjiv Gupta <sanjiv.gupta@microchip.com>
Sun, 10 May 2009 16:18:39 +0000 (16:18 +0000)
committerSanjiv Gupta <sanjiv.gupta@microchip.com>
Sun, 10 May 2009 16:18:39 +0000 (16:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71394 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PIC16/PIC16AsmPrinter.cpp

index 86f5b4ee583972531813a51bec530e1ccd5920b9..1aebe09209cc848cea29082e7558bf383d735670 100644 (file)
@@ -175,8 +175,8 @@ void PIC16AsmPrinter::EmitExternsAndGlobals (Module &M) {
     if (Name.find("llvm.") != std::string::npos)
       continue;
 
-    assert ((I->isDeclaration() || I->hasExternalLinkage())
-            && "Not an extern function declaration or definition");
+    if (! (I->isDeclaration() || I->hasExternalLinkage()))
+      continue;
 
     const char *directive = I->isDeclaration() ? TAI->getExternDirective() :
                                                  TAI->getGlobalDirective();