Andrew Santosa via llvm-dev
2017-Sep-20 01:00 UTC
[llvm-dev] llvm-link: Missing Dwarf DIE references
I saw a .o file <mypath>/DreamListViewController.o among .bc files in your llvm-link command. Could that be the cause of the problem? Andrew On Tuesday, 19 September 2017, 11:08:40 pm GMT+8, via llvm-dev <llvm-dev at lists.llvm.org> wrote: Date: Mon, 18 Sep 2017 13:28:52 -0700 From: Jack Carter via llvm-dev <llvm-dev at lists.llvm.org> To: via llvm-dev <llvm-dev at lists.llvm.org> Subject: [llvm-dev] llvm-link: Missing Dwarf DIE references Message-ID: <2925B40E-3CD4-454C-96A5-2E05729C365F at yahoo.com> Content-Type: text/plain; charset="utf-8" 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. 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. The input modules are from Swift (LucidDreams) and have been compiled -O. The problem doesn't seem to exist when they are compiled -Onone. 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: warning: could not find referenced DIE in DIE: 0x0000a33f: DW_TAG_inlined_subroutine [20] * DW_AT_abstract_origin [DW_FORM_ref4] (cu + 0x0c84 => {0x0000a40d}) DW_AT_ranges [DW_FORM_sec_offset] (0x00021960 [0x0000000000001878 - 0x000000000000187c) [0x00000000000018b0 - 0x0000000000001910) [0x0000000000001980 - 0x00000000000019e0)) DW_AT_call_file [DW_FORM_data1] ("<mypath>/testprogram_lucidDreams/iOS_APP/LucidDreams/DreamListViewControllerModel.swift") DW_AT_call_line [DW_FORM_data1] (61) 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: 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. Here are the commands I used to generate the error (omitting the original Swift compile): ######################## ######################## llvm-link \ -o <mypath>/iOS_APP.bc \ <mypath>/DreamListViewController.o \ <mypath>/TextEntryCollectionViewCell.bc \ <mypath>/ImageDrawable.bc \ <mypath>/DreamScene.bc \ <mypath>/DreamListViewControllerModel.bc \ <mypath>/CreatureCollectionViewCell.bc \ <mypath>/RangeReplaceableCollection+IndexSet.bc \ <mypath>/DreamPreviewHeaderReusableView.bc \ <mypath>/Rendering.bc ######################## ######################## xcrun \ --sdk iphoneos \ <mypath>/Xcode_9.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ \ -fembed-bitcode \ <mypath>/iOS_APP.bc \ -arch arm64 \ -O0 \ -c \ -o <mypath>/iOS_APP.bc.o ######################## ######################## llvm-dwarfdump -verbose -verify small.o > small.o.dwarfdump Any insights would be appreciated. Input bitcode files are attached. Thanks, Jack _______________________________________________ llvm-dev mailing list llvm-dev at lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170920/24e31d3c/attachment.html>