diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-05-22 16:27:06 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-05-22 16:27:06 +0000 |
commit | ea6e216751979131b269ed31873edbe7e8b752a3 (patch) | |
tree | 8d4911a0bcd4c99ce3e832fce88bdad34bd61bfc /runtime/Runtest | |
parent | 21bbf33d53209f1bc30562b1bebb9f568c5c7360 (diff) | |
download | klee-ea6e216751979131b269ed31873edbe7e8b752a3.tar.gz |
Add "name" argument to klee_make_symbolic, and kill off klee_make_symbolic_name.
- For compatibility we still accept 2 argument form of klee_make_symbolic, but this will go away eventually. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72265 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime/Runtest')
-rw-r--r-- | runtime/Runtest/intrinsics.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/runtime/Runtest/intrinsics.c b/runtime/Runtest/intrinsics.c index 1a2fd030..36efb5c2 100644 --- a/runtime/Runtest/intrinsics.c +++ b/runtime/Runtest/intrinsics.c @@ -31,7 +31,7 @@ static unsigned char rand_byte(void) { return x & 0xFF; } -void klee_make_symbolic_name(void *array, unsigned nbytes, const char *name) { +void klee_make_symbolic(void *array, unsigned nbytes, const char *name) { static int rand_init = -1; if (rand_init == -1) { @@ -94,10 +94,6 @@ void klee_make_symbolic_name(void *array, unsigned nbytes, const char *name) { } } -void klee_make_symbolic(void *array, unsigned nbytes) { - klee_make_symbolic_name(array, nbytes, "unnamed"); -} - void *klee_malloc_n(unsigned nelems, unsigned size, unsigned alignment) { #if 1 return mmap((void*) 0x90000000, nelems*size, PROT_READ|PROT_WRITE, @@ -119,7 +115,7 @@ void klee_silent_exit(int x) { unsigned klee_choose(unsigned n) { unsigned x; - klee_make_symbolic(&x, sizeof x); + klee_make_symbolic(&x, sizeof x, "klee_choose"); if(x >= n) fprintf(stderr, "ERROR: max = %d, got = %d\n", n, x); assert(x < n); @@ -136,9 +132,9 @@ unsigned klee_get_value(unsigned x) { return x; } -int klee_range_name(int begin, int end, const char* name) { +int klee_range(int begin, int end, const char* name) { int x; - klee_make_symbolic_name(&x, sizeof x, name); + klee_make_symbolic(&x, sizeof x, name); if (x<begin || x>=end) { fprintf(stderr, "KLEE: ERROR: invalid klee_range(%u,%u,%s) value, got: %u\n", |