-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8154 from tautschnig/cleanup/remove_use_std_string
Remove support for irep_idt-as-std::string
- Loading branch information
Showing
14 changed files
with
6 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,24 +33,13 @@ Author: Daniel Kroening, [email protected] | |
#include <map> | ||
#endif | ||
|
||
#ifdef USE_DSTRING | ||
typedef dstringt irep_idt; | ||
// NOLINTNEXTLINE(readability/identifiers) | ||
typedef dstring_hash irep_id_hash; | ||
#else | ||
#include "string_hash.h" | ||
typedef std::string irep_idt; | ||
// NOLINTNEXTLINE(readability/identifiers) | ||
typedef string_hash irep_id_hash; | ||
#endif | ||
|
||
inline const std::string &id2string(const irep_idt &d) | ||
{ | ||
#ifdef USE_DSTRING | ||
return as_string(d); | ||
#else | ||
return d; | ||
#endif | ||
} | ||
|
||
#ifdef IREP_DEBUG | ||
|
@@ -76,9 +65,8 @@ struct ref_count_ift<true> | |
|
||
/// A node with data in a tree, it contains: | ||
/// | ||
/// * \ref irept::dt::data : A string (Unless `USE_STD_STRING` is set, this is | ||
/// actually a \ref dstringt and thus an integer which is a reference into a | ||
/// string table.) | ||
/// * \ref irept::dt::data : A \ref dstringt and thus an integer which is a | ||
/// reference into a string table.) | ||
/// | ||
/// * \ref irept::dt::named_sub : A map from `irep_idt` (a string) to \ref | ||
/// irept. This is used for named children, i.e. subexpressions, parameters, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,15 +12,7 @@ Author: Reuben Thomas, [email protected] | |
#ifndef CPROVER_UTIL_IREP_IDS_H | ||
#define CPROVER_UTIL_IREP_IDS_H | ||
|
||
#ifndef USE_STD_STRING | ||
#define USE_DSTRING | ||
#endif | ||
|
||
#ifdef USE_DSTRING | ||
#include "dstring.h" | ||
#else | ||
#include <string> | ||
#endif | ||
|
||
/// \file | ||
/// The irep_ids are generated using a technique called | ||
|
@@ -34,18 +26,9 @@ Author: Reuben Thomas, [email protected] | |
/// into a const extern irep_idt with the variable name `ID_param` and the | ||
/// string value `"contents"`. | ||
|
||
#ifdef USE_DSTRING | ||
|
||
#define IREP_ID_ONE(the_id) extern const dstringt ID_##the_id; | ||
#define IREP_ID_TWO(the_id, str) extern const dstringt ID_##the_id; | ||
|
||
#else | ||
|
||
#define IREP_ID_ONE(the_id) extern const std::string ID_##the_id; | ||
#define IREP_ID_TWO(the_id, str) extern const std::string ID_##the_id; | ||
|
||
#endif | ||
|
||
#include "irep_ids.def" | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters