From 307f6201cedeeab244fa7a219a9495cbb0c9529c Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 9 Jun 2009 06:39:17 +0000 Subject: Remove Array::id. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73128 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Solver/STPBuilder.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/Solver') diff --git a/lib/Solver/STPBuilder.cpp b/lib/Solver/STPBuilder.cpp index 680b7d43..856540fe 100644 --- a/lib/Solver/STPBuilder.cpp +++ b/lib/Solver/STPBuilder.cpp @@ -388,8 +388,10 @@ ExprHandle STPBuilder::constructSDivByConstant(ExprHandle expr_n, unsigned width if (root->stpInitialArray) { return root->stpInitialArray; } else { + // STP uniques arrays by name, so we make sure the name is unique by + // including the address. char buf[32]; - sprintf(buf, "arr%d", root->id); + sprintf(buf, "%s_%p", root->name.c_str(), (void*) root); root->stpInitialArray = buildArray(buf, 32, 8); return root->stpInitialArray; } -- cgit 1.4.1