//
//===----------------------------------------------------------------------===//
-#ifndef _LLVM_DIFFCONSUMER_H_
-#define _LLVM_DIFFCONSUMER_H_
+#ifndef LLVM_TOOLS_LLVM_DIFF_DIFFCONSUMER_H
+#define LLVM_TOOLS_LLVM_DIFF_DIFFCONSUMER_H
#include "DiffLog.h"
-
-#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
-#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/Casting.h"
+#include "llvm/Support/raw_ostream.h"
namespace llvm {
class Module;
/// The interface for consumers of difference data.
class Consumer {
+ virtual void anchor();
public:
/// Record that a local context has been entered. Left and
/// Right are IR "containers" of some sort which are being
};
raw_ostream &out;
- Module *LModule;
- Module *RModule;
SmallVector<DiffContext, 5> contexts;
bool Differences;
unsigned Indent;
void indent();
public:
- DiffConsumer(Module *L, Module *R)
- : out(errs()), LModule(L), RModule(R), Differences(false), Indent(0) {}
+ DiffConsumer()
+ : out(errs()), Differences(false), Indent(0) {}
bool hadDifferences() const;
- void enterContext(Value *L, Value *R);
- void exitContext();
- void log(StringRef text);
- void logf(const LogBuilder &Log);
- void logd(const DiffLogBuilder &Log);
+ void enterContext(Value *L, Value *R) override;
+ void exitContext() override;
+ void log(StringRef text) override;
+ void logf(const LogBuilder &Log) override;
+ void logd(const DiffLogBuilder &Log) override;
};
}