[PATCH] D59010: [DebugInfo] Add test cases for FlagNonTrivial
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 6 08:38:23 PST 2019
dblaikie added a comment.
Mind adding at least one example with neither triviality flag? (I guess a type that's not a struct or class? A union maybe?)
(in some ways this test is retesting some of the triviality that's already tested by other parts of the compiler that relies on triviality properties - so I'm ambivalent about testing /all/ these combinations (for instance, I'd probably not both testing any cases related to access modifiers at least - public/private doesn't have any effect on triviality, right? (so I'd leave all the tests public/struct))
================
Comment at: test/CodeGenCXX/debug-info-composite-triviality.cpp:4-5
+// Cases to show some non-trivial types with flags combined with DIFlagNonTrivial and DIFlagTypePassByValue.
+#define DEFINE_FUNCTION(T) \
+ T Func_##T(T &arg) { return arg; }
+
----------------
Would it be sufficient for this function to just be:
void Func(T&) {}
Since C++ supports overloading, there shouldn't be a need to mangle the type name into the function name manually, and any reference to the type should be enough for it to be emitted.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59010/new/
https://reviews.llvm.org/D59010
More information about the llvm-commits
mailing list