From c10a184867e4fb6b9299db526dc6e1f667a6f7ce Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Thu, 24 Sep 2015 16:10:14 +0000 Subject: [PATCH] dsymutil: Fix the condition to distinguish module imports form definitions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248512 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/tools/dsymutil/Inputs/submodules/1.o | Bin 0 -> 2208 bytes .../dsymutil/Inputs/submodules/Parent.pcm | Bin 0 -> 25104 bytes test/tools/dsymutil/X86/submodules.m | 40 ++++++++++++++++++ tools/dsymutil/DwarfLinker.cpp | 2 +- 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 test/tools/dsymutil/Inputs/submodules/1.o create mode 100644 test/tools/dsymutil/Inputs/submodules/Parent.pcm create mode 100644 test/tools/dsymutil/X86/submodules.m diff --git a/test/tools/dsymutil/Inputs/submodules/1.o b/test/tools/dsymutil/Inputs/submodules/1.o new file mode 100644 index 0000000000000000000000000000000000000000..f95b70cd05cd20746926f53cecef077746164d19 GIT binary patch literal 2208 zcmb7GTWb?h5T4!Kwx*^x!3L#9jMajqRg0}!tMOVzrD#DxaM^6PY1+*uZZ1>^wA7c@ z7p*9W|3T1yAPDN4zUiwE(kG#hqN0A2J)5N4R_oB2Gc#w-cjnB_IqCcFUw?&&Bp*S5 z{ooHQVqj1de3R`BsKg6FDzM30@HKPch<; z!r)PGBXNG7c50mdtA6m++q3bX9I{x6e;ZjW##dgu3v?6B8!H=jA(OLWhZBQ|zS#bv zU9zTQhx!Nmj~?lX?KjPGwzt7I&_hFo;&{dyrd}G=Y{M#2g3e54%yH^X^g5nIUe8ii z%UG1bv}UJu7G=^WHJhY1X>X(>;ES|w-x2vT8*Y=@aW~{H$rqWcMCL0Ie3&k(8-9h3 zg^!0jJBR`aEN%}j&qhym`XcPz7roeV5^r`eK(cUML|`ZmfZ=c$)l^!DJxy&?-}Uos z^yTT$i__SOo`Ri+SE<&xl?Ft8PGYR}1i!Cx5@H0*Grmg=2KlA#LD;oNjl-oIw;|rI?zf4WFCh&DjTa<(>VKx7sAQKvE9XvSc ZD$n2}?h<26j3>m%o42rVNv+-&`U5%6?e72p literal 0 HcmV?d00001 diff --git a/test/tools/dsymutil/Inputs/submodules/Parent.pcm b/test/tools/dsymutil/Inputs/submodules/Parent.pcm new file mode 100644 index 0000000000000000000000000000000000000000..dca33af4268d83f58cb316342eb551485cb89d18 GIT binary patch literal 25104 zcmd^oeRPx8ndd9nGLD2Dg-C+bG?fXH%Ad%xE!z#5>ccj+YiuD4Y#bU{#wKnWRZ`NDp0sNPNJ&c)C72#(mOa>_&ANM-ttZ3m`s`+QahrBJJ)72Tx3g@Q z?(FZm_r22lN^)T4%>K1H5qkCB``-K9=i~Q$+$-mYzx(k2tdS&5frNkXF2sA0{;}eX z*F$&@(Dzkdzu&_fR^&e7JI0jgT_Qgh3{H+7os_@eBNz;{4FodZv#-Q>iu)18HJ;xa z4jp(ZbXXoU81#0#d$uXNu0e7ai z7^hgiH8hlIldp`*JHg<{=j;o(E0&(Qd4`owtE^7Ge+G6Tt1dB-E(QG51y{~*)X zDL?$nA^9Tnk$1d95c25Z-0?bOy%Uc&hs0I-Gi$ui#6);Bcp$W&hRdN(jJH{S{9eZ+ zt)WM<*Bh4U6XWgq$Iv$s+M7LIJZrqjJ&rf|`H8&iosq{A@;!go@wh&R#}AC=TkkD- zypPNLTfED7#20Qb_p>KRSR3$O!E+kAGtAo!xb)F?yy!k_Q+(3>f6UA4^LA*~O485n zlO)5`Q=WSLo452cR>PZf`fFDGr4{|Tq`vHhX>(W9;)$9(_&0R?g&UsAm#3;uXlrgx zRi8-}{d6qWZ;cHO#r(H*{l&3ewphvY@9E!k>95S`FRU2O$MtXf^ygfLH?4+uk{Zw8 zvbiH+8AzCpCCna;<=DK*A2oM{3O1ehRL!NT7PK`tQbkW4)$Q(x^>tuC-LBg@T+px& z{7V0JT>q`O{tY8&GbHW$i+ucKdF7LCi+|bVpErA=W_irz_5P^I+1*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sg0-t`v=-{Ub0c zwW_jvDuq1S>+GXF{j>oorUEOO?Qru@AJ6IQYs)_9#BQ+%)YRdA z)~s|VPsi=s$%2)eLvEiBXCq*U*q5@~mB!0kl)dkEpy-cBL!Zk&D#iXp@l$(k)K;N5 z8Wp5JGfbxg6x@LHLij#tAc=ic=C4#Ob14o&H{4#og}q27CL0 z1L9a6+pqJtvEy*0jdk`q9JEu+hX-h%UC9mxR(Wo9^g@Pg5XJMXbLN;E_9al1R+b@H zhn<1;ARs2spwt3LQMWKAvs>&a<=%t)_lFLQSm}@0{^2H~HT#6614l8XOW%BZ7)Lqj z=%+L_Y28p}x$zq3b)9 zZYlX~&l_EsELt3uq@9vv`dFdM^E6AFgM@mI^mA4aExQE;rr#u>t^djo z-d!sh@O1j&2dEV3LH+m$$mTCP(ENJi*UITRAAWB!x_z|g;AHx5snaqv z(xLwv{N!4Y=sR?9@*oa!GFs?)Izg?GKHbpKRm`Z~Um}i{ge}bWW63m*?;7a02va5a?E^bYPY2>-wrS5sU-`O=Mnm9q z@w&jN`zl-4n1_$+f93xEMKsS&506;S6&MR6#rR>3_>IhFqoik0fbo8cw}1trvv!O4 zh6cQT>|!6%_s)9SKY`2ZC6Op$r}D*4n_J~WI?|1K?&Gmodules.modulemap <getTag() == dwarf::DW_TAG_module && + if (DIE->getTag() == dwarf::DW_TAG_module && ParentIdx == 0 && DIE->getAttributeValueAsString(&CU.getOrigUnit(), dwarf::DW_AT_name, "") != CU.getClangModuleName()) { InImportedModule = true; -- 2.34.1