From 20c51be30c2be1d41f81e182b72dd33b8678d988 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97232 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PIC16/PIC16Passes/PIC16Cloner.cpp | 3 +++ 1 file changed, 3 insertions(+) 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. -- 2.34.1