diff options
| author | 2020-08-03 15:06:44 +0000 | |
|---|---|---|
| committer | 2020-08-03 15:06:44 +0000 | |
| commit | b64793999546ed8adebaeebd9d8345d18db8927d (patch) | |
| tree | 4357c27b561d73b0e089727c6ed659f2ceff5f47 /gnu/llvm/tools/llvm-diff/DiffConsumer.h | |
| parent | Add support for UTF-8 DISPLAY-HINTs with octet length. For now only (diff) | |
| download | wireguard-openbsd-b64793999546ed8adebaeebd9d8345d18db8927d.tar.xz wireguard-openbsd-b64793999546ed8adebaeebd9d8345d18db8927d.zip | |
Remove LLVM 8.0.1 files.
Diffstat (limited to 'gnu/llvm/tools/llvm-diff/DiffConsumer.h')
| -rw-r--r-- | gnu/llvm/tools/llvm-diff/DiffConsumer.h | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/gnu/llvm/tools/llvm-diff/DiffConsumer.h b/gnu/llvm/tools/llvm-diff/DiffConsumer.h deleted file mode 100644 index 82f5ce598b4..00000000000 --- a/gnu/llvm/tools/llvm-diff/DiffConsumer.h +++ /dev/null @@ -1,91 +0,0 @@ -//===-- DiffConsumer.h - Difference Consumer --------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This header defines the interface to the LLVM difference Consumer -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_TOOLS_LLVM_DIFF_DIFFCONSUMER_H -#define LLVM_TOOLS_LLVM_DIFF_DIFFCONSUMER_H - -#include "DiffLog.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/IR/Value.h" -#include "llvm/Support/Casting.h" -#include "llvm/Support/raw_ostream.h" - -namespace llvm { -class StringRef; - class Module; - class Value; - class Function; - - /// 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 - /// considered for structural equivalence: global variables, - /// functions, blocks, instructions, etc. - virtual void enterContext(Value *Left, Value *Right) = 0; - - /// Record that a local context has been exited. - virtual void exitContext() = 0; - - /// Record a difference within the current context. - virtual void log(StringRef Text) = 0; - - /// Record a formatted difference within the current context. - virtual void logf(const LogBuilder &Log) = 0; - - /// Record a line-by-line instruction diff. - virtual void logd(const DiffLogBuilder &Log) = 0; - - protected: - virtual ~Consumer() {} - }; - - class DiffConsumer : public Consumer { - private: - struct DiffContext { - DiffContext(Value *L, Value *R) - : L(L), R(R), Differences(false), IsFunction(isa<Function>(L)) {} - Value *L; - Value *R; - bool Differences; - bool IsFunction; - DenseMap<Value*,unsigned> LNumbering; - DenseMap<Value*,unsigned> RNumbering; - }; - - raw_ostream &out; - SmallVector<DiffContext, 5> contexts; - bool Differences; - unsigned Indent; - - void printValue(Value *V, bool isL); - void header(); - void indent(); - - public: - DiffConsumer() - : out(errs()), Differences(false), Indent(0) {} - - bool hadDifferences() const; - 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; - }; -} - -#endif |
