From ef686dc38d309e8491c75f6fb32706550100ff59 Mon Sep 17 00:00:00 2001 From: Sanjiv Gupta Date: Fri, 26 Feb 2010 18:32:18 +0000 Subject: [PATCH] The cloner has nothing to do if any of the main or ISR entrypoints are not present in the module. llvm-svn: 97232 --- llvm/lib/Target/PIC16/PIC16Passes/PIC16Cloner.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/lib/Target/PIC16/PIC16Passes/PIC16Cloner.cpp b/llvm/lib/Target/PIC16/PIC16Passes/PIC16Cloner.cpp index 01dbdca3b8ff..865da35de3c5 100644 --- a/llvm/lib/Target/PIC16/PIC16Passes/PIC16Cloner.cpp +++ b/llvm/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.