diff options
| author | Adrian Prantl <aprantl@apple.com> | 2019-06-26 20:04:09 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2019-06-26 20:04:09 +0000 |
| commit | 8ac899c6003cba58162161cc07c5c5e2f0da5194 (patch) | |
| tree | 00589e39763e8771459d405aadc3cebf49b19a5c | |
| parent | 4201ed2ea385224f0301e4a06d10cf11dd088d09 (diff) | |
| download | bcm5719-llvm-8ac899c6003cba58162161cc07c5c5e2f0da5194.tar.gz bcm5719-llvm-8ac899c6003cba58162161cc07c5c5e2f0da5194.zip | |
Make nrvo-string test more robust.
The breakpoint locations were in places where clang doesn't actually
emit a source location for and depend on the debugger's ability to
move the breakpoint forward onto a line that is already in the
function epilogue. In my testing older versions of LLDB fail to do
that, so I'm modifying the test to force a break-able location by
calling a noinline function.
<rdar://problem/52079841>
llvm-svn: 364466
| -rw-r--r-- | debuginfo-tests/nrvo-string.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/debuginfo-tests/nrvo-string.cpp b/debuginfo-tests/nrvo-string.cpp index e27d4d31526..de89056fc84 100644 --- a/debuginfo-tests/nrvo-string.cpp +++ b/debuginfo-tests/nrvo-string.cpp @@ -7,6 +7,7 @@ // RUN: %test_debuginfo %s %t.out // // PR34513 +void __attribute__((noinline)) stop() {} struct string { string() {} @@ -17,7 +18,8 @@ struct string { string get_string() { string unused; string result = 3; - // DEBUGGER: break 21 + // DEBUGGER: break 22 + stop(); return result; } void some_function(int) {} @@ -32,7 +34,8 @@ string2 get_string2() { some_function(result.i); // Test that the debugger can get the value of result after another // function is called. - // DEBUGGER: break 35 + // DEBUGGER: break 38 + stop(); return result; } int main() { |

