summaryrefslogtreecommitdiffstats
path: root/debuginfo-tests
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2019-06-27 20:38:37 +0000
committerAdrian Prantl <aprantl@apple.com>2019-06-27 20:38:37 +0000
commit559c6e17cd88da0c70fea7d9fd8933d1d2739ab7 (patch)
treeb18f9fa11f14cbd41282ecaf38507d421dbf814a /debuginfo-tests
parent7ecf1ec49a8e9b7a6fc1551282d4c11797980bbd (diff)
downloadbcm5719-llvm-559c6e17cd88da0c70fea7d9fd8933d1d2739ab7.tar.gz
bcm5719-llvm-559c6e17cd88da0c70fea7d9fd8933d1d2739ab7.zip
Make nrvo-string test more robust.
This is a follow-up to r364466, but better implemented. Original commit message still applies: 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: 364589
Diffstat (limited to 'debuginfo-tests')
-rw-r--r--debuginfo-tests/nrvo-string.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/debuginfo-tests/nrvo-string.cpp b/debuginfo-tests/nrvo-string.cpp
index de89056fc84..ba8d9d42f6f 100644
--- a/debuginfo-tests/nrvo-string.cpp
+++ b/debuginfo-tests/nrvo-string.cpp
@@ -7,7 +7,8 @@
// RUN: %test_debuginfo %s %t.out
//
// PR34513
-void __attribute__((noinline)) stop() {}
+volatile int sideeffect = 0;
+void __attribute__((noinline)) stop() { sideeffect++; }
struct string {
string() {}
@@ -18,7 +19,7 @@ struct string {
string get_string() {
string unused;
string result = 3;
- // DEBUGGER: break 22
+ // DEBUGGER: break 23
stop();
return result;
}
@@ -34,7 +35,7 @@ string2 get_string2() {
some_function(result.i);
// Test that the debugger can get the value of result after another
// function is called.
- // DEBUGGER: break 38
+ // DEBUGGER: break 39
stop();
return result;
}
OpenPOWER on IntegriCloud