diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-02 12:46:23 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-02 12:46:23 +0000 |
commit | edad5bcb76bf472a1487c0f3dd94a5914213a647 (patch) | |
tree | 63c3f98843d0debbfd390005cf8e05250cd3fe28 /include/llvm/Support | |
parent | 0bc1bd0d3931803dc6a26d35758f93527359bcdb (diff) |
Notes
Diffstat (limited to 'include/llvm/Support')
-rw-r--r-- | include/llvm/Support/FormatVariadic.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/llvm/Support/FormatVariadic.h b/include/llvm/Support/FormatVariadic.h index c1153e84dfb56..408c6d8b2e0d2 100644 --- a/include/llvm/Support/FormatVariadic.h +++ b/include/llvm/Support/FormatVariadic.h @@ -94,6 +94,15 @@ public: Adapters.reserve(ParamCount); } + formatv_object_base(formatv_object_base const &rhs) = delete; + + formatv_object_base(formatv_object_base &&rhs) + : Fmt(std::move(rhs.Fmt)), + Adapters(), // Adapters are initialized by formatv_object + Replacements(std::move(rhs.Replacements)) { + Adapters.reserve(rhs.Adapters.size()); + }; + void format(raw_ostream &S) const { for (auto &R : Replacements) { if (R.Type == ReplacementType::Empty) @@ -149,6 +158,14 @@ public: Parameters(std::move(Params)) { Adapters = apply_tuple(create_adapters(), Parameters); } + + formatv_object(formatv_object const &rhs) = delete; + + formatv_object(formatv_object &&rhs) + : formatv_object_base(std::move(rhs)), + Parameters(std::move(rhs.Parameters)) { + Adapters = apply_tuple(create_adapters(), Parameters); + } }; // \brief Format text given a format string and replacement parameters. |