Skip to content

Commit 4dd0f29

Browse files
authored
Merge pull request #1892 from diffblue/remove-OPERANDS_IN_GETSUB
remove OPERANDS_IN_GETSUB define, which is now simply the only option
2 parents 80060ea + b519b41 commit 4dd0f29

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

src/util/expr.h

-10
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Author: Daniel Kroening, [email protected]
1010
#ifndef CPROVER_UTIL_EXPR_H
1111
#define CPROVER_UTIL_EXPR_H
1212

13-
#define OPERANDS_IN_GETSUB
14-
1513
#include <functional>
1614
#include "type.h"
1715

@@ -67,18 +65,10 @@ class exprt:public irept
6765
{ return !operands().empty(); }
6866

6967
operandst &operands()
70-
#ifdef OPERANDS_IN_GETSUB
7168
{ return (operandst &)get_sub(); }
72-
#else
73-
{ return (operandst &)(add(ID_operands).get_sub()); }
74-
#endif
7569

7670
const operandst &operands() const
77-
#ifdef OPERANDS_IN_GETSUB
7871
{ return (const operandst &)get_sub(); }
79-
#else
80-
{ return (const operandst &)(find(ID_operands).get_sub()); }
81-
#endif
8272

8373
exprt &op0()
8474
{ return operands().front(); }

src/util/irep_ids.def

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ IREP_ID_TWO(empty_string, )
55
IREP_ID_ONE(let)
66
IREP_ID_ONE(nil)
77
IREP_ID_ONE(type)
8-
IREP_ID_ONE(operands)
98
IREP_ID_ONE(bool)
109
IREP_ID_ONE(c_bool)
1110
IREP_ID_ONE(proper_bool)

0 commit comments

Comments
 (0)