diff options
| author | Adrian McCarthy <amccarth@google.com> | 2016-04-26 22:25:40 +0000 |
|---|---|---|
| committer | Adrian McCarthy <amccarth@google.com> | 2016-04-26 22:25:40 +0000 |
| commit | fd5c9be4bba42b508bdcc9515993be1f36364594 (patch) | |
| tree | d8fe8938dc5e84acdac11469cebd6723462444a8 /lldb/packages/Python/lldbsuite/test/lang/c | |
| parent | d2d2aa52cda3ea9d68bdd2052143ec67bdfd0c33 (diff) | |
| download | bcm5719-llvm-fd5c9be4bba42b508bdcc9515993be1f36364594.tar.gz bcm5719-llvm-fd5c9be4bba42b508bdcc9515993be1f36364594.zip | |
Fix TestRegisterVariables.py on Windows
Use __attribute__((regparm(x))) to ensure the compiler enregisters at least some arguments when calling functions.
Differential Revision: http://reviews.llvm.org/D19548
llvm-svn: 267616
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/c')
| -rw-r--r-- | lldb/packages/Python/lldbsuite/test/lang/c/register_variables/test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/test.c b/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/test.c index 9acd3f3835b..476c32899ed 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/test.c +++ b/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/test.c @@ -5,20 +5,20 @@ struct bar { int m2; }; -void f1(int a, struct bar *b) __attribute__ ((noinline)); +void f1(int a, struct bar *b) __attribute__((noinline)) __attribute__((regparm(2))); void f1(int a, struct bar *b) { b->m2 = b->m1 + a; // set breakpoint here } -void f2(struct bar *b) __attribute__ ((noinline)); +void f2(struct bar *b) __attribute__((noinline)) __attribute__((regparm(1))); void f2(struct bar *b) { int c = b->m2; printf("%d\n", c); // set breakpoint here } -float f3() __attribute__ ((noinline)); +float f3() __attribute__((noinline)); float f3() { return 3.14f; } |

