aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-diff/DifferenceEngine.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-diff/DifferenceEngine.h')
-rw-r--r--llvm/tools/llvm-diff/DifferenceEngine.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/tools/llvm-diff/DifferenceEngine.h b/llvm/tools/llvm-diff/DifferenceEngine.h
index da1b6526a6e2..436a35566360 100644
--- a/llvm/tools/llvm-diff/DifferenceEngine.h
+++ b/llvm/tools/llvm-diff/DifferenceEngine.h
@@ -33,7 +33,8 @@ namespace llvm {
public:
/// A RAII object for recording the current context.
struct Context {
- Context(DifferenceEngine &Engine, Value *L, Value *R) : Engine(Engine) {
+ Context(DifferenceEngine &Engine, const Value *L, const Value *R)
+ : Engine(Engine) {
Engine.consumer.enterContext(L, R);
}
@@ -50,7 +51,7 @@ namespace llvm {
class Oracle {
virtual void anchor();
public:
- virtual bool operator()(Value *L, Value *R) = 0;
+ virtual bool operator()(const Value *L, const Value *R) = 0;
protected:
virtual ~Oracle() {}
@@ -59,8 +60,8 @@ namespace llvm {
DifferenceEngine(Consumer &consumer)
: consumer(consumer), globalValueOracle(nullptr) {}
- void diff(Module *L, Module *R);
- void diff(Function *L, Function *R);
+ void diff(const Module *L, const Module *R);
+ void diff(const Function *L, const Function *R);
void log(StringRef text) {
consumer.log(text);
}
@@ -78,7 +79,7 @@ namespace llvm {
}
/// Determines whether two global values are equivalent.
- bool equivalentAsOperands(GlobalValue *L, GlobalValue *R);
+ bool equivalentAsOperands(const GlobalValue *L, const GlobalValue *R);
private:
Consumer &consumer;