summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/llvm-diff/DiffLog.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/llvm-diff/DiffLog.h')
-rw-r--r--contrib/llvm/tools/llvm-diff/DiffLog.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/contrib/llvm/tools/llvm-diff/DiffLog.h b/contrib/llvm/tools/llvm-diff/DiffLog.h
index 8eb53ff..8f28461 100644
--- a/contrib/llvm/tools/llvm-diff/DiffLog.h
+++ b/contrib/llvm/tools/llvm-diff/DiffLog.h
@@ -27,7 +27,7 @@ namespace llvm {
/// A temporary-object class for building up log messages.
class LogBuilder {
- Consumer &consumer;
+ Consumer *consumer;
/// The use of a stored StringRef here is okay because
/// LogBuilder should be used only as a temporary, and as a
@@ -38,8 +38,12 @@ namespace llvm {
SmallVector<Value*, 4> Arguments;
public:
- LogBuilder(Consumer &c, StringRef Format)
- : consumer(c), Format(Format) {}
+ LogBuilder(Consumer &c, StringRef Format) : consumer(&c), Format(Format) {}
+ LogBuilder(LogBuilder &&L)
+ : consumer(L.consumer), Format(L.Format),
+ Arguments(std::move(L.Arguments)) {
+ L.consumer = nullptr;
+ }
LogBuilder &operator<<(Value *V) {
Arguments.push_back(V);
OpenPOWER on IntegriCloud