瀏覽代碼

* different definitions for the same Objective-C class (can happen with
external class declarations) need a type conversion in LLVM (because
they're represented by different LLVM types)

git-svn-id: trunk@42970 -

Jonas Maebe 5 年之前
父節點
當前提交
cdafe680c2
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      compiler/llvm/nllvmcnv.pas

+ 3 - 0
compiler/llvm/nllvmcnv.pas

@@ -87,6 +87,9 @@ class function tllvmtypeconvnode.target_specific_need_equal_typeconv(fromdef, to
        { same for two different specialisations }
        { same for two different specialisations }
        ((df_specialization in fromdef.defoptions) and
        ((df_specialization in fromdef.defoptions) and
         (df_specialization in todef.defoptions)) or
         (df_specialization in todef.defoptions)) or
+       { external objc classes referring to the same type }
+       (is_objc_class_or_protocol(fromdef) and
+        is_objc_class_or_protocol(todef)) or
        { typed from/to untyped filedef in ISO mode: have to keep because of
        { typed from/to untyped filedef in ISO mode: have to keep because of
          the get/put buffer }
          the get/put buffer }
        ((fromdef.typ=filedef) and
        ((fromdef.typ=filedef) and