[Lldb-commits] [PATCH] D132635: [lldb][Test] Prevent generating DW_AT_location for unused argument
Michael Buch via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 25 00:48:37 PDT 2022
Michael137 updated this revision to Diff 455491.
Michael137 added a comment.
Herald added a subscriber: JDevlieghere.
- clang-format
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132635/new/
https://reviews.llvm.org/D132635
Files:
lldb/test/API/functionalities/unused-inlined-parameters/TestUnusedInlinedParameters.py
lldb/test/API/functionalities/unused-inlined-parameters/main.c
Index: lldb/test/API/functionalities/unused-inlined-parameters/main.c
===================================================================
--- lldb/test/API/functionalities/unused-inlined-parameters/main.c
+++ lldb/test/API/functionalities/unused-inlined-parameters/main.c
@@ -2,11 +2,12 @@
__attribute__((optnone)) __attribute__((nodebug)) void use(int used) {}
-__attribute__((always_inline)) void f(void *unused1, int used, int unused2) {
+__attribute__((always_inline)) void f(void *unused1, int used) {
use(used); // break here
}
int main(int argc, char **argv) {
- f(argv, 42, 1);
+ char *undefined;
+ f(undefined, 42);
return 0;
-}
\ No newline at end of file
+}
Index: lldb/test/API/functionalities/unused-inlined-parameters/TestUnusedInlinedParameters.py
===================================================================
--- lldb/test/API/functionalities/unused-inlined-parameters/TestUnusedInlinedParameters.py
+++ lldb/test/API/functionalities/unused-inlined-parameters/TestUnusedInlinedParameters.py
@@ -17,5 +17,3 @@
self.assertIn("(void *) unused1 = <no location, value may have been optimized out>",
lldbutil.get_description(self.frame().FindVariable("unused1")))
self.assertEqual(42, self.frame().FindVariable("used").GetValueAsUnsigned())
- self.assertIn("(int) unused2 = <no location, value may have been optimized out>",
- lldbutil.get_description(self.frame().FindVariable("unused2")))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132635.455491.patch
Type: text/x-patch
Size: 1494 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220825/5d89a9fe/attachment-0001.bin>
More information about the lldb-commits
mailing list