From: maartenbrock Date: Wed, 5 Apr 2006 09:42:42 +0000 (+0000) Subject: * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=60439902f811cd6f2f0c0793e270e7347d3fef6d;p=fw%2Fsdcc * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both --no-peep and --peep-file are used don't use default rules but do use the git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4079 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 91ca8c20..7b8d4107 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-04-05 Maarten Brock + + * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both + --no-peep and --peep-file are used don't use default rules but + do use the + 2006-04-05 Maarten Brock * src/mcs51/gen.c (genCall): fixed bug 1457608 diff --git a/src/SDCCpeeph.c b/src/SDCCpeeph.c index 478178c6..3a12a74c 100644 --- a/src/SDCCpeeph.c +++ b/src/SDCCpeeph.c @@ -2279,13 +2279,18 @@ initPeepHole () char *s; /* read in the default rules */ - readRules (port->peep.default_rules); + if (!options.nopeep) + { + readRules (port->peep.default_rules); + } /* if we have any additional file read it too */ if (options.peep_file) { readRules (s = readFileIntoBuffer (options.peep_file)); setToNull ((void *) &s); + /* override nopeep setting, default rules have not been read */ + options.nopeep = 0; }