<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br>I saw a .o file <mypath>/DreamListViewController.o among .bc files in your llvm-link command.<br>Could that be the cause of the problem?<br><br>Andrew<br><br> On Tuesday, 19 September 2017, 11:08:40 pm GMT+8, via llvm-dev <llvm-dev@lists.llvm.org> wrote: <br><br>Date: Mon, 18 Sep 2017 13:28:52 -0700<br>From: Jack Carter via llvm-dev <llvm-dev@lists.llvm.org><br>To: via llvm-dev <llvm-dev@lists.llvm.org><br>Subject: [llvm-dev] llvm-link: Missing Dwarf DIE references<br>Message-ID: <2925B40E-3CD4-454C-96A5-2E05729C365F@yahoo.com><br>Content-Type: text/plain; charset="utf-8"<br><br>I am experiencing an issue combining bitcode files for the purpose of generating the combined bitcodes as a single bitcode file. I would like to have any pointers to help me debug this or maybe it has been seen before and a fix is either being worked on or is done.<br><br>I am using the Xcode 9.0 compiler. I believe the Swift code is 3.x. I have reproduced this using the tot llvm-link.<br><br>The input modules are from Swift (LucidDreams) and have been compiled -O. The problem doesn't seem to exist when they are compiled -Onone. <br><br>The llvm-link occurs without error and the subsequent compilation also seems to go fine, but when the resultant llvm-dwarfdump -verbose -verify is run I get a bunch of the following errors:<br><br>warning: could not find referenced DIE<br>    in DIE:<br><br>0x0000a33f:      DW_TAG_inlined_subroutine [20] *<br>                    DW_AT_abstract_origin [DW_FORM_ref4]    (cu + 0x0c84 => {0x0000a40d})<br>                    DW_AT_ranges [DW_FORM_sec_offset]    (0x00021960<br>                      [0x0000000000001878 - 0x000000000000187c)<br>                      [0x00000000000018b0 - 0x0000000000001910)<br>                      [0x0000000000001980 - 0x00000000000019e0))<br>                    DW_AT_call_file [DW_FORM_data1]    ("<mypath>/testprogram_lucidDreams/iOS_APP/LucidDreams/DreamListViewControllerModel.swift")<br>                    DW_AT_call_line [DW_FORM_data1]    (61)<br>while processing <mypath>/testprogram_lucidDreams/iOS_APP/DerivedData/iOS_APP/Build/Intermediates.noindex/iOS_APP.build/Debug-iphoneos/iOS_APP.build/Objects-normal/arm64/iOS_APP.bc.o:<br><br>All the errors reference DreamListViewControllerModel.swift and have todo with inlining, but if I remove enough of the input bitcode objects from the llvm-link the error goes away even though DreamListViewControllerModel is still included.<br><br>Here are the commands I used to generate the error (omitting the original Swift compile):<br><br>########################<br>########################<br>llvm-link \<br>-o <mypath>/iOS_APP.bc \<br><mypath>/DreamListViewController.o \<br><mypath>/TextEntryCollectionViewCell.bc \<br><mypath>/ImageDrawable.bc \<br><mypath>/DreamScene.bc \<br><mypath>/DreamListViewControllerModel.bc \<br><mypath>/CreatureCollectionViewCell.bc \<br><mypath>/RangeReplaceableCollection+IndexSet.bc \<br><mypath>/DreamPreviewHeaderReusableView.bc \<br><mypath>/Rendering.bc<br><br>########################<br>########################<br>xcrun \<br>--sdk iphoneos \<br><mypath>/Xcode_9.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ \<br>-fembed-bitcode \<br><mypath>/iOS_APP.bc \<br>-arch arm64 \<br>-O0 \<br>-c \<br>-o <mypath>/iOS_APP.bc.o<br><br>########################<br>########################<br>llvm-dwarfdump -verbose -verify small.o > small.o.dwarfdump<br><br>Any insights would be appreciated. Input bitcode files are attached.<br><br>Thanks,<br>Jack<br><br>_______________________________________________<br>llvm-dev mailing list<br>llvm-dev@lists.llvm.org<br>http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br><br><br></div></body></html>