From: Sanjiv Gupta Date: Fri, 26 Feb 2010 18:32:18 +0000 (+0000) Subject: The cloner has nothing to do if any of the main or ISR entrypoints are not X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=20c51be30c2be1d41f81e182b72dd33b8678d988;p=oota-llvm.git The cloner has nothing to do if any of the main or ISR entrypoints are not present in the module. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97232 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/PIC16/PIC16Passes/PIC16Cloner.cpp b/lib/Target/PIC16/PIC16Passes/PIC16Cloner.cpp index 01dbdca3b8f..865da35de3c 100644 --- a/lib/Target/PIC16/PIC16Passes/PIC16Cloner.cpp +++ b/lib/Target/PIC16/PIC16Passes/PIC16Cloner.cpp @@ -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.