浏览代码

* removed unnecessary internalerror triggered when reading wpo info for a
program whereby no methods can be optimized for the last class in the
contextinsensitive_devirtualization section

git-svn-id: trunk@13559 -

Jonas Maebe 16 年之前
父节点
当前提交
c6b5038d5e
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      compiler/optvirt.pas

+ 3 - 1
compiler/optvirt.pas

@@ -1012,8 +1012,10 @@ unit optvirt;
             { cut off the trailing & }
             { cut off the trailing & }
             setlength(classid,length(classid)-1);
             setlength(classid,length(classid)-1);
             classdevirtinfo:=unitdevirtinfo.addclass(classid,instantiated);
             classdevirtinfo:=unitdevirtinfo.addclass(classid,instantiated);
+            { last class could be an instantiated class without any
+               optimisable methods. }
             if not reader.sectiongetnextline(vmttype) then
             if not reader.sectiongetnextline(vmttype) then
-              internalerror(2008100506);
+              exit;
             { any optimisable virtual methods? }
             { any optimisable virtual methods? }
             if (vmttype<>'') then
             if (vmttype<>'') then
               begin
               begin