[PATCH] D16440: [ThinLTO] Link in only necessary DICompileUnit operands

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 22 09:17:21 PST 2016


tejohnson added a comment.

In http://reviews.llvm.org/D16440#333561, @dblaikie wrote:

> Should the tests be testing that, when you import the DISubprogram, that you get any types needed by that DISubprogram (& only those types)?


Good idea, I will add a new test that has some types.


================
Comment at: test/Transforms/FunctionImport/funcimport_debug.ll:17
@@ -16,2 +16,3 @@
 ; CHECK: ![[MAINSP]] = distinct !DISubprogram(name: "main"
+; CHECK-NOT: distinct !DICompileUnit({{.*}} enums:
 ; CHECK: !{{[0-9]+}} = distinct !DICompileUnit({{.*}} subprograms: ![[SPs2:[0-9]+]]
----------------
dblaikie wrote:
> Does this test the right thing? (if you revert your change and run this test, does it fail?)
> 
> I would've expected the following DICompileUnit to match, and there to be no DICompileUnit match between one and the next. Whereas I would've guessed this was trying to check that there were no enums in the DICompileUNit checked on the next line?
Good catch - it doesn't work. I modified the test to ensure that there is no enums here by specifying the expected preceeding operand (emissionKind), here and in the other test. Confirmed that backing out my change causes this to fail.

Is there a better way to do this?


http://reviews.llvm.org/D16440





More information about the llvm-commits mailing list