[PATCH] [dwarfdump] Print the name for referenced specification of abstract_origin DIEs.

Frederic Riss friss at apple.com
Tue Sep 23 09:12:40 PDT 2014


>>! In D5466#4, @dblaikie wrote:
> Looks fairly reasonable - not sure whether the test cases (if they pass without modifications) need updating. I'm undecided about if/how this feature will improve testing (in the existing cases, as you've kept, they really end up testing that the offsets actually refer to the desired DIE - I think that's valuable, rather than just testing the name (& at that point I'm not sure how much value we gain by testing the name as well)). What are your thoughts?

I think that the feature is very valuable as a llvm-dwarfdump user. In a real dump, being able to identify directly inlined subroutines is really neat. For testing, I'm quite sure some tests can benefit from it. In the one you point out in the review for example, I test that the FileCheck patterns are actually checking the right function without having to match the offsets. There is little room for doubt in the test, but I think it is a nice and easy addition, if only as some sort of self-documentation of the test. Testing both the name and the offset - like it's done in many of the updated tests - doesn't bring any value except for testing the dumping feature in itself.
 
I think only 1 or 2 tests needed real updates to pass. All the others I modified just add coverage for the introduced feature. I looked for tests that handle abstract_origins and specifications and just choose some of them (being sure to include exotic stuff like cross-cu references).

================
Comment at: test/DebugInfo/inline-scopes.ll:27
@@ -26,6 +26,3 @@
 ; CHECK-NOT: DW_TAG
-; CHECK-NOT: NULL
-; CHECK: DW_TAG_lexical_block
-; CHECK-NOT: DW_TAG
-; CHECK-NOT: NULL
-; CHECK: DW_TAG_variable
+; CHECK:   DW_AT_abstract_origin {{.*}} "_Z2f1v")
+; CHECK-NOT: {{DW_TAG|NULL}}
----------------
dblaikie wrote:
> Why so many changes here? I assume this test would've passed unmodified even with your improvements (but I guess that's true of most of these test cases?)
I just added checks that we are FileChecking the right inlined_subroutine tree. yes, this test would have passed without modifications.

http://reviews.llvm.org/D5466






More information about the llvm-commits mailing list