codetools: search unit objcbase in modeswitch objectivec1

git-svn-id: trunk@22765 -
This commit is contained in:
mattias 2009-11-25 12:13:28 +00:00
parent 6ba3e8f884
commit 2f998fb898

View File

@ -1860,7 +1860,8 @@ begin
and (Scanner.PascalCompiler=pcFPC)
and (CompareIdentifiers(PChar(Result),'MacPas')=0))
or ((Scanner.CompilerModeSwitch=cmsObjectiveC1)
and (CompareIdentifiers(PChar(Result),'ObjC')=0))
and ((CompareIdentifiers(PChar(Result),'ObjC')=0)
or (CompareIdentifiers(PChar(Result),'ObjCBase')=0)))
then begin
Result:='';
exit;
@ -5756,6 +5757,7 @@ type
sutMacPas,
sutObjPas,
sutObjC,
sutObjCBase,
sutLineInfo,
sutHeapTrc,
sutSysThrds,
@ -5798,6 +5800,8 @@ begin
CurUnitType:=sutObjPas
else if UpAtomIs('OBJC') then
CurUnitType:=sutObjC
else if UpAtomIs('OBJCBASE') then
CurUnitType:=sutObjCBase
else if UpAtomIs('LINEINFO') then
CurUnitType:=sutLineInfo
else if UpAtomIs('HEAPTRC') then
@ -5835,6 +5839,12 @@ begin
Result:=FindIdentifierInUsedUnit('ObjPas',Params);
if Result and Params.IsFinal then exit;
end;
if (CurUnitType>sutObjCBase)
and (Scanner.CompilerModeSwitch=cmsObjectiveC1) then begin
// try hidden used fpc unit 'objcbase'
Result:=FindIdentifierInUsedUnit('ObjCBase',Params);
if Result and Params.IsFinal then exit;
end;
if (CurUnitType>sutObjC)
and (Scanner.CompilerModeSwitch=cmsObjectiveC1) then begin
// try hidden used fpc unit 'objc'