<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8px; font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255);" class="">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.</span><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8px; font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255);" class=""><br class=""></div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8px; font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255);" class="">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.</div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8px; font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255);" class=""><br class=""><div class="">The input modules are from Swift (LucidDreams) and have been compiled -O. The problem doesn't seem to exist when they are compiled -Onone. </div><div class=""><br class=""></div><div class="">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 class=""><br class=""><div class="">warning: could not find referenced DIE</div><div class="">    in DIE:</div><div class=""><br class=""></div><div class="">0x0000a33f:       DW_TAG_inlined_subroutine [20] *</div><div class="">                    DW_AT_abstract_origin [DW_FORM_ref4]<span style="white-space: pre-wrap;" class="">   </span>(cu + 0x0c84 => {0x0000a40d})</div><div class="">                    DW_AT_ranges [DW_FORM_sec_offset]<span style="white-space: pre-wrap;" class="">  </span>(0x00021960</div><div class="">                       [0x0000000000001878 - 0x000000000000187c)</div><div class="">                       [0x00000000000018b0 - 0x0000000000001910)</div><div class="">                       [0x0000000000001980 - 0x00000000000019e0))</div><div class="">                    DW_AT_call_file [DW_FORM_data1]<span style="white-space: pre-wrap;" class="">      </span>("<mypath>/testprogram_<wbr class="">lucidDreams/iOS_APP/<wbr class="">LucidDreams/<wbr class="">DreamListViewControllerModel.<wbr class="">swift")</div><div class="">                    DW_AT_call_line [DW_FORM_data1]<span style="white-space: pre-wrap;" class=""> </span>(61)</div><div class="">while processing <mypath>/testprogram_<wbr class="">lucidDreams/iOS_APP/<wbr class="">DerivedData/iOS_APP/Build/<wbr class="">Intermediates.noindex/iOS_APP.<wbr class="">build/Debug-iphoneos/iOS_APP.<wbr class="">build/Objects-normal/arm64/<wbr class="">iOS_APP.bc.o:</div><div class=""><br class=""></div>All the errors reference DreamListViewControllerModel.<wbr class="">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.</div><div class=""><br class=""></div><div class="">Here are the commands I used to generate the error (omitting the original Swift compile):</div><div class=""><br class=""><div class="">########################</div><div class="">########################<br class=""></div><div class="">llvm-link \</div><div class="">-o <mypath>/iOS_APP.bc \</div><div class=""><mypath>/<wbr class="">DreamListViewController.o \</div><div class=""><mypath>/<wbr class="">TextEntryCollectionViewCell.bc \</div><div class=""><div class=""><mypath>/ImageDrawable.bc \<br class=""></div><div class=""><mypath>/DreamScene.bc \<br class=""></div><div class=""></div><div class=""><mypath>/<wbr class="">DreamListViewControllerModel.<wbr class="">bc \<br class=""></div><div class=""><mypath>/<wbr class="">CreatureCollectionViewCell.bc \<br class=""></div></div><div class=""><mypath>/<wbr class="">RangeReplaceableCollection+<wbr class="">IndexSet.bc \<br class=""></div><div class=""><mypath>/<wbr class="">DreamPreviewHeaderReusableView<wbr class="">.bc \<br class=""></div><div class=""><mypath>/Rendering.bc<br class=""></div><div class=""><br class=""></div><div class="">########################</div><div class="">########################<br class=""></div><div class="">xcrun \</div><div class="">--sdk iphoneos \</div><div class=""><mypath>/Xcode_9.0.app/<wbr class="">Contents/Developer/Toolchains/<wbr class="">XcodeDefault.xctoolchain/usr/<wbr class="">bin/clang++ \</div><div class="">-fembed-bitcode \</div><div class=""><mypath>/iOS_APP.bc \</div><div class="">-arch arm64 \</div><div class="">-O0 \</div><div class="">-c \</div><div class="">-o <mypath>/iOS_APP.bc.o</div><div class=""><br class=""></div><div class=""><div class="">########################</div><div class="">########################<br class=""></div></div><div class="">llvm-dwarfdump -verbose -verify small.o > small.o.dwarfdump<br class=""></div><br class="">Any insights would be appreciated. Input bitcode files are attached.</div></div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8px; font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255);" class=""><br class=""></div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8px; font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255);" class="">Thanks,</div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8px; font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255);" class="">Jack</div></body></html>