mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-18 14:20:25 +00:00
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
This commit is contained in:
parent
7ecf1ec49a
commit
559c6e17cd
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user