diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2013-08-13 22:15:40 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2013-08-13 22:15:40 +0000 |
| commit | 7da504faa497cb04c4fa5682495fa1f1f9da3e6f (patch) | |
| tree | 026aea4f6330774926c719a2f1855ec1fbfe6634 /compiler-rt/lib/dfsan/lit_tests | |
| parent | 04632f1f1643b38c32e1c5a9ffb1d8e87201ca3b (diff) | |
| download | bcm5719-llvm-7da504faa497cb04c4fa5682495fa1f1f9da3e6f.tar.gz bcm5719-llvm-7da504faa497cb04c4fa5682495fa1f1f9da3e6f.zip | |
[dfsan] Introduce dfsan_read_label runtime function.
Differential Revision: http://llvm-reviews.chandlerc.com/D1349
llvm-svn: 188319
Diffstat (limited to 'compiler-rt/lib/dfsan/lit_tests')
| -rw-r--r-- | compiler-rt/lib/dfsan/lit_tests/basic.c | 3 | ||||
| -rw-r--r-- | compiler-rt/lib/dfsan/lit_tests/propagate.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/compiler-rt/lib/dfsan/lit_tests/basic.c b/compiler-rt/lib/dfsan/lit_tests/basic.c index db1acb71208..de11bd186e9 100644 --- a/compiler-rt/lib/dfsan/lit_tests/basic.c +++ b/compiler-rt/lib/dfsan/lit_tests/basic.c @@ -13,5 +13,8 @@ int main(void) { dfsan_label new_label = dfsan_get_label(i); assert(i_label == new_label); + dfsan_label read_label = dfsan_read_label(&i, sizeof(i)); + assert(i_label == read_label); + return 0; } diff --git a/compiler-rt/lib/dfsan/lit_tests/propagate.c b/compiler-rt/lib/dfsan/lit_tests/propagate.c index d78c9ae0b33..31b65ee72a4 100644 --- a/compiler-rt/lib/dfsan/lit_tests/propagate.c +++ b/compiler-rt/lib/dfsan/lit_tests/propagate.c @@ -34,5 +34,8 @@ int main(void) { assert(dfsan_has_label(ijk_label, j_label)); assert(dfsan_has_label(ijk_label, k_label)); + struct { int i, j; } s = { i, j }; + assert(dfsan_read_label(&s, sizeof(s)) == ij_label); + return 0; } |

