Skip to content

Commit 590fc2d

Browse files
committed
Make USE_DSTRING conditional and disable it in Ubuntu/Clang/DEBUG Travis job
This introduces a macro USE_STD_STRING that can be set to disable USE_DSTRING, and thus the use of dstringt as the implementation of irep_idt. The Ubuntu/Clang/DEBUG Travis stage sets this macro to avoid future changes breaking the build when disabling USE_DSTRING.
1 parent 52290b0 commit 590fc2d

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ jobs:
142142
- CCACHE_CPP2=yes
143143
- EXTRA_CXXFLAGS="-DNDEBUG"
144144

145-
# Ubuntu Linux with glibc using clang++-3.7, debug mode
145+
# Ubuntu Linux with glibc using clang++-3.7, debug mode, disable USE_DSTRING
146146
- stage: Test different OS/CXX/Flags
147147
os: linux
148148
sudo: false
@@ -165,7 +165,7 @@ jobs:
165165
env:
166166
- COMPILER="ccache clang++-3.7 -Qunused-arguments -fcolor-diagnostics"
167167
- CCACHE_CPP2=yes
168-
- EXTRA_CXXFLAGS="-DDEBUG"
168+
- EXTRA_CXXFLAGS="-DDEBUG -DUSE_STD_STRING"
169169
script: echo "Not running any tests for a debug build."
170170

171171
# cmake build using g++-5

doc/architectural/cbmc-guide.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -597,5 +597,5 @@ they are in the code.
597597
[^2]: Or references, if reference counted data sharing is enabled. It is
598598
enabled by default; see the `SHARING` macro.
599599

600-
[^3]: When `USE_DSTRING` is enabled (it is by default), this is actually
600+
[^3]: Unless `USE_STD_STRING` is set, this is actually
601601
a `dstring` and thus an integer which is a reference into a string table

src/util/irep_ids.h

+2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ Author: Reuben Thomas, [email protected]
1212
#ifndef CPROVER_UTIL_IREP_IDS_H
1313
#define CPROVER_UTIL_IREP_IDS_H
1414

15+
#ifndef USE_STD_STRING
1516
#define USE_DSTRING
17+
#endif
1618

1719
#ifdef USE_DSTRING
1820
#include "dstring.h"

0 commit comments

Comments
 (0)