Browse Source

* don't give an internalerror when setting the mangledbasename in case the
regular mangledname has already been set (just like we don't internalerror
when changing the regular mangledname even if it has already been set);
this happens e.g. when specifying the external name of some interface
variables, such as in the Win32 system unit

git-svn-id: branches/jvmbackend@20893 -

Jonas Maebe 13 years ago
parent
commit
fb73001389
1 changed files with 5 additions and 7 deletions
  1. 5 7
      compiler/symsym.pas

+ 5 - 7
compiler/symsym.pas

@@ -1714,16 +1714,14 @@ implementation
 
     procedure tstaticvarsym.set_mangledbasename(const s: TSymStr);
       begin
-  {$ifdef symansistr}
-        if _mangledname<>'' then
-          internalerror(2011082202);
+{$ifdef symansistr}
         _mangledbasename:=s;
-  {$else symansistr}
-        if assigned(_mangledname) then
-          internalerror(2011082202);
+        _mangledname:='';
+{$else symansistr}
+        stringdispose(_mangledname);
         stringdispose(_mangledbasename);
         _mangledbasename:=stringdup(s);
-  {$endif symansistr}
+{$endif symansistr}
         include(varoptions,vo_has_mangledname);
       end;