[llvm-dev] llvm-link: Missing Dwarf DIE references

Jack Carter via llvm-dev llvm-dev at lists.llvm.org
Mon Sep 18 13:28:52 PDT 2017


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170918/9f66aaa6/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bitcode_files.tgz
Type: application/octet-stream
Size: 351685 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170918/9f66aaa6/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170918/9f66aaa6/attachment-0003.html>


More information about the llvm-dev mailing list