瀏覽代碼

* 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 年之前
父節點
當前提交
fb73001389
共有 1 個文件被更改,包括 5 次插入7 次删除
  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;