fcl-passrc: useanalyzer: do not export resourcestrings

git-svn-id: trunk@43310 -
This commit is contained in:
Mattias Gaertner 2019-10-25 09:35:45 +00:00
parent 2d20151446
commit acc72f01a1
2 changed files with 5 additions and 2 deletions

View File

@ -1404,7 +1404,10 @@ begin
UseVariable(TPasVariable(Decl),rraNone,true); UseVariable(TPasVariable(Decl),rraNone,true);
end end
else if C=TPasResString then else if C=TPasResString then
UseResourcestring(TPasResString(Decl)) begin
if OnlyExports then continue;
UseResourcestring(TPasResString(Decl));
end
else if C=TPasAttributes then else if C=TPasAttributes then
// attributes are never used directly // attributes are never used directly
else else

View File

@ -842,9 +842,9 @@ begin
StartProgram(false); StartProgram(false);
Add([ Add([
'resourcestring', 'resourcestring',
'resourcestring',
' {#a_used}a = ''txt'';', ' {#a_used}a = ''txt'';',
' {#b_used}b = ''foo'';', ' {#b_used}b = ''foo'';',
' {#c_notused}c = ''bar'';',
'procedure {#DoIt_used}DoIt(s: string);', 'procedure {#DoIt_used}DoIt(s: string);',
'var', 'var',
' {#d_used}d: string;', ' {#d_used}d: string;',