Browse Source

* removed invalid code from proc_get_importname where the result could be empty

git-svn-id: trunk@6926 -
peter 18 years ago
parent
commit
6db1d803fa
1 changed files with 9 additions and 17 deletions
  1. 9 17
      compiler/pdecsub.pas

+ 9 - 17
compiler/pdecsub.pas

@@ -2116,24 +2116,16 @@ const
                   need to use the normal name since to functions can refer to the
                   need to use the normal name since to functions can refer to the
                   same DLL function. This is also needed for compatability
                   same DLL function. This is also needed for compatability
                   with Delphi and TP7 }
                   with Delphi and TP7 }
-                case target_info.system of
-                  system_i386_emx,
-                  system_i386_os2 :
-                    begin
-                      { keep normal mangledname }
-                    end;
-                  else
-                    if assigned(pd.import_name) then
-                      begin
-                        if target_info.system in system_all_windows then
-                          { cprefix is not used in DLL imports under Windows }
-                          result:=pd.import_name^
-                        else
-                          result:=maybe_cprefix(pd.import_name^);
-                      end
+                if assigned(pd.import_name) then
+                  begin
+                    if target_info.system in system_all_windows then
+                      { cprefix is not used in DLL imports under Windows }
+                      result:=pd.import_name^
                     else
                     else
-                      result:=ExtractFileName(pd.import_dll^)+'_index_'+tostr(pd.import_nr);
-                end;
+                      result:=maybe_cprefix(pd.import_name^);
+                  end
+                else
+                  result:=ExtractFileName(pd.import_dll^)+'_index_'+tostr(pd.import_nr);
               end
               end
             else
             else
               result:=maybe_cprefix(pd.import_name^);
               result:=maybe_cprefix(pd.import_name^);