[llvm-dev] llvm-link: Missing Dwarf DIE references (original) (raw)

Adrian Prantl via llvm-dev llvm-dev at lists.llvm.org
Tue Sep 19 10:09:51 PDT 2017


On Sep 18, 2017, at 1:28 PM, Jack Carter via llvm-dev <llvm-dev at lists.llvm.org> wrote:

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.

As general note, for questions about using the Swift compiler the swift-dev mailing list on swift.org is a more appropriate forum unless the bug can also be reproduced with an unmodified llvm.oprg toolchain.

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: DWTAGinlinedsubroutine [20] * DWATabstractorigin [DWFORMref4] (cu + 0x0c84 => {0x0000a40d}) DWATranges [DWFORMsecoffset] (0x00021960 [0x0000000000001878 - 0x000000000000187c) [0x00000000000018b0 - 0x0000000000001910) [0x0000000000001980 - 0x00000000000019e0)) DWATcallfile [DWFORMdata1] ("/testprogramlucidDreams/iOSAPP/LucidDreams/DreamListViewControllerModel.swift") DWATcallline [DWFORMdata1] (61) while processing /testprogramlucidDreams/iOSAPP/DerivedData/iOSAPP/Build/Intermediates.noindex/iOSAPP.build/Debug-iphoneos/iOSAPP.build/Objects-normal/arm64/iOSAPP.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 /iOSAPP.bc _ _/DreamListViewController.o _ _/TextEntryCollectionViewCell.bc _ _/ImageDrawable.bc _ _/DreamScene.bc _ _/DreamListViewControllerModel.bc _ _/CreatureCollectionViewCell.bc _ _/RangeReplaceableCollection+IndexSet.bc _ _/DreamPreviewHeaderReusableView.bc _ /Rendering.bc ######################## ######################## _xcrun _ _--sdk iphoneos _ _/Xcode9.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ _ _-fembed-bitcode _ _/iOSAPP.bc _ _-arch arm64 _ _-O0 _ _-c _ -o /iOSAPP.bc.o ######################## ######################## llvm-dwarfdump -verbose -verify small.o > small.o.dwarfdump Any insights would be appreciated. Input bitcode files are attached.

Could you please file a bugreport on bugs.swift.org for this and assign it to me?

thanks, adrian

Thanks, Jack <bitcodefiles.tgz>


LLVM Developers mailing list llvm-dev at lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev



More information about the llvm-dev mailing list