summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAina Niemetz <aina.niemetz@gmail.com>2021-03-26 11:32:38 -0700
committerGitHub <noreply@github.com>2021-03-26 18:32:38 +0000
commitc84f7715ef73036b6b862b135881de991f66d0d4 (patch)
tree4967b9edbf7be14c010641c5f0a326f460dbbc25
parent72f70f1573651bcbf5f327c7a3411ece0e607e3f (diff)
FloatingPointLiteral: Make constructors that shouldn't be used outside of FloatingPoint(Literal) private. (#6211)
-rw-r--r--src/util/floatingpoint_literal_symfpu.h.in69
1 files changed, 35 insertions, 34 deletions
diff --git a/src/util/floatingpoint_literal_symfpu.h.in b/src/util/floatingpoint_literal_symfpu.h.in
index d7e1a2241..2424bad66 100644
--- a/src/util/floatingpoint_literal_symfpu.h.in
+++ b/src/util/floatingpoint_literal_symfpu.h.in
@@ -342,40 +342,6 @@ class FloatingPointLiteral
const BitVector& bv,
bool signedBV);
- /**
- * Create a FP literal from unpacked representation.
- *
- * This unpacked representation accounts for additional bits required for the
- * exponent to allow subnormals to be normalized.
- *
- * This should NOT be used to create a literal from its IEEE bit-vector
- * representation -- for this, the above constructor is to be used while
- * creating a SymFPUUnpackedFloatLiteral via symfpu::unpack.
- */
- FloatingPointLiteral(const FloatingPointSize& size,
- const bool sign,
- const BitVector& exp,
- const BitVector& sig)
- : d_fp_size(size)
-// clang-format off
-#if @CVC4_USE_SYMFPU@
- // clang-format on
- ,
- d_symuf(SymFPUUnpackedFloatLiteral(sign, exp, sig))
-#endif
- {
- }
-
-// clang-format off
-#if @CVC4_USE_SYMFPU@
- // clang-format on
-
- /** Create a FP literal from a symFPU unpacked float. */
- FloatingPointLiteral(const FloatingPointSize& size,
- SymFPUUnpackedFloatLiteral symuf)
- : d_fp_size(size), d_symuf(symuf){};
-#endif
-
~FloatingPointLiteral() {}
/** Return the size of this FP literal. */
@@ -489,6 +455,41 @@ class FloatingPointLiteral
#endif
private:
+
+ /**
+ * Create a FP literal from unpacked representation.
+ *
+ * This unpacked representation accounts for additional bits required for the
+ * exponent to allow subnormals to be normalized.
+ *
+ * This should NOT be used to create a literal from its IEEE bit-vector
+ * representation -- for this, the above constructor is to be used while
+ * creating a SymFPUUnpackedFloatLiteral via symfpu::unpack.
+ */
+ FloatingPointLiteral(const FloatingPointSize& size,
+ const bool sign,
+ const BitVector& exp,
+ const BitVector& sig)
+ : d_fp_size(size)
+// clang-format off
+#if @CVC4_USE_SYMFPU@
+ // clang-format on
+ ,
+ d_symuf(SymFPUUnpackedFloatLiteral(sign, exp, sig))
+#endif
+ {
+ }
+
+// clang-format off
+#if @CVC4_USE_SYMFPU@
+ // clang-format on
+
+ /** Create a FP literal from a symFPU unpacked float. */
+ FloatingPointLiteral(const FloatingPointSize& size,
+ SymFPUUnpackedFloatLiteral symuf)
+ : d_fp_size(size), d_symuf(symuf){};
+#endif
+
/** The floating-point size of this floating-point literal. */
FloatingPointSize d_fp_size;
// clang-format off
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback