Changeset 2619 in kBuild for trunk/src/kObjCache/kObjCache.c
- Timestamp:
- Aug 2, 2012 3:48:51 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kObjCache/kObjCache.c
r2618 r2619 1354 1354 1355 1355 1356 1357 1356 static size_t kOCCppRdOptFlush(PKOCCPPRD pCppRd, size_t offSrcCur, int fLineDirNext) 1358 1357 { … … 1477 1476 { 1478 1477 size_t const offSrcLine = pCppRd->offSrcCur; 1479 size_t const cchSrcLine = pszEol - pCppRd->pszBuf - pCppRd->offSrcCur;1478 size_t const cchSrcLine = pszEol - pCppRd->pszBuf - (pCppRd->fOptimize & 2 ? pCppRd->offSrcUnoptimized : pCppRd->offSrcCur); 1480 1479 size_t const cbLeftAssert = *pcbLeft; 1481 1480 char *pszNewFile; … … 1521 1520 */ 1522 1521 size_t cchLineDir; 1523 kOCCppRdOptFlush(pCppRd, offSrcLine, 1); 1522 if (!(pCppRd->fOptimize & 2)) 1523 kOCCppRdOptFlush(pCppRd, offSrcLine, 1); 1524 1524 1525 1525 cchLineDir = kOCCppRdOptFmtLine(pCppRd, uNewLineNo, NULL, 0) - 1; /* sans \n */ … … 1537 1537 1538 1538 kOCCppRdOptSetFile(pCppRd, pszNewFile, cchNewFile); /* save to do this early */ 1539 kOCCppRdOptFlush(pCppRd, offSrcLine, 1); 1539 if (!(pCppRd->fOptimize & 2)) 1540 kOCCppRdOptFlush(pCppRd, offSrcLine, 1); 1540 1541 1541 1542 cchLineDir = kOCCppRdOptFmtLine(pCppRd, uNewLineNo, pCppRd->pszFileNmBuf, cchNewFile) - 1; /* sans \n */ … … 3837 3838 if (!kOCSumHasEqualInChain(&pEntry->Old.SumHead, &pEntry->New.SumHead)) 3838 3839 { 3839 InfoMsg(2, "no checksum match - comparing output\n"); 3840 if (!kOCEntryCompareOldAndNewOutput(pEntry)) 3840 if (pEntry->fOptimizeCpp & 2) 3841 { 3842 InfoMsg(2, "no checksum match - no need to compare output, -O2.\n"); 3841 3843 pEntry->fNeedCompiling = 1; 3844 } 3842 3845 else 3843 kOCSumAddChain(&pEntry->New.SumHead, &pEntry->Old.SumHead); 3846 { 3847 InfoMsg(2, "no checksum match - comparing output\n"); 3848 if (!kOCEntryCompareOldAndNewOutput(pEntry)) 3849 pEntry->fNeedCompiling = 1; 3850 else 3851 kOCSumAddChain(&pEntry->New.SumHead, &pEntry->Old.SumHead); 3852 } 3844 3853 } 3845 3854 } … … 5018 5027 else if (!strcmp(argv[i], "-O1") || !strcmp(argv[i], "--optimize-1")) 5019 5028 fOptimizePreprocessorOutput = 1; 5029 else if (!strcmp(argv[i], "-O2") || !strcmp(argv[i], "--optimize-2")) 5030 fOptimizePreprocessorOutput = 1 | 2; 5020 5031 else if (!strcmp(argv[i], "-p") || !strcmp(argv[i], "--passthru")) 5021 5032 fRedirPreCompStdOut = fRedirCompileStdIn = 1; … … 5159 5170 if (fOptimizePreprocessorOutput) 5160 5171 { 5161 InfoMsg( 1, "g_cbMemMoved=%#x (%d)\n", g_cbMemMoved, g_cbMemMoved);5162 InfoMsg( 1, "g_cMemMoves=%#x (%d)\n", g_cMemMoves, g_cMemMoves);5172 InfoMsg(3, "g_cbMemMoved=%#x (%d)\n", g_cbMemMoved, g_cbMemMoved); 5173 InfoMsg(3, "g_cMemMoves=%#x (%d)\n", g_cMemMoves, g_cMemMoves); 5163 5174 } 5164 5175
Note:
See TracChangeset
for help on using the changeset viewer.