codetools: linkscannr: updateneeded if StoreDirectives changed to true

git-svn-id: trunk@41124 -
This commit is contained in:
mattias 2013-05-11 08:21:06 +00:00
parent 48d579b7f0
commit 495e85b016

View File

@ -387,6 +387,7 @@ type
FDirectivesCapacity: integer;
FDirectivesSorted: PPLSDirective; // array of PLSDirective to items of FDirectives
FDirectiveName: shortstring;
FDirectivesStored: boolean;
FMacrosOn: boolean;
FMissingIncludeFiles: TMissingIncludeFiles;
FIncludeStack: TFPList; // list of TSourceLink
@ -512,7 +513,8 @@ type
property DirectivesSorted[Index: integer]: PLSDirective read GetDirectivesSorted; // sorted for Code and SrcPos
property DirectiveCount: integer read FDirectivesCount;
procedure ClearDirectives(FreeMemory: boolean);
property StoreDirectives: boolean read FStoreDirectives write SetStoreDirectives;
property StoreDirectives: boolean read FStoreDirectives write SetStoreDirectives; // store directives on next Scan
property DirectivesStored: boolean read FDirectivesStored; // directives were stored on last scan
function FindDirective(aCode: Pointer; aSrcPos: integer;
out FirstSortedIndex, LastSortedIndex: integer): boolean;
@ -1647,6 +1649,7 @@ begin
FNestedComments:=cmsNested_comment in DefaultCompilerModeSwitches[CompilerMode];
IfLevel:=0;
FSkippingDirectives:=lssdNone;
FDirectivesStored:=StoreDirectives;
//DebugLn('TLinkScanner.Scan D --------');
// initialize Defines
@ -2096,6 +2099,9 @@ begin
if CheckFilesOnDisk then FGlobalSourcesChangeStep:=CurFilesChangeStep;
end;
// check options
if StoreDirectives and (not DirectivesStored) then exit;
// check initvalues
if Assigned(FOnGetInitValues) then begin
NewInitValues:=FOnGetInitValues(Code,NewInitValuesChangeStep);