The cloner has nothing to do if any of the main or ISR entrypoints are not
authorSanjiv Gupta <sanjiv.gupta@microchip.com>
Fri, 26 Feb 2010 18:32:18 +0000 (18:32 +0000)
committerSanjiv Gupta <sanjiv.gupta@microchip.com>
Fri, 26 Feb 2010 18:32:18 +0000 (18:32 +0000)
present in the module.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97232 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PIC16/PIC16Passes/PIC16Cloner.cpp

index 01dbdca3b8fffe3f82932e89f658f80cff4278b5..865da35de3c57a1f8e42125dc5158927b0813486 100644 (file)
@@ -89,6 +89,9 @@ bool PIC16Cloner::runOnModule(Module &M) {
      if (mainCGN && isrCGN)
        break;
    }
+
+   // We have nothing to do if any of the main or ISR is missing.
+   if (! mainCGN || ! isrCGN) return false;
        
    // Time for some diagnostics.
    // See if the main itself is interrupt function then report an error.