From 73b21b738ee74f33f16ca6bf88bd4344b3fca0a9 Mon Sep 17 00:00:00 2001 From: John McCall Date: Thu, 29 Jul 2010 18:08:23 +0000 Subject: Make the header self-contained and follow #include guidelines. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109774 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-diff/DifferenceEngine.cpp | 36 +++++++++++++------------- tools/llvm-diff/DifferenceEngine.h | 10 +++++--- tools/llvm-diff/llvm-diff.cpp | 49 +++++++++++++++++++++--------------- 3 files changed, 52 insertions(+), 43 deletions(-) (limited to 'tools/llvm-diff') diff --git a/tools/llvm-diff/DifferenceEngine.cpp b/tools/llvm-diff/DifferenceEngine.cpp index 55b1a362a8..7436d1ed4e 100644 --- a/tools/llvm-diff/DifferenceEngine.cpp +++ b/tools/llvm-diff/DifferenceEngine.cpp @@ -7,30 +7,28 @@ // //===----------------------------------------------------------------------===// // -// This header defines the interface to the LLVM difference engine, -// which structurally compares functions within a module. +// This header defines the implementation of the LLVM difference +// engine, which structurally compares global values within a module. // //===----------------------------------------------------------------------===// -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include +#include "DifferenceEngine.h" -#include -#include -#include -#include +#include "llvm/Function.h" +#include "llvm/Instructions.h" +#include "llvm/Module.h" +#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/DenseSet.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/ADT/StringSet.h" +#include "llvm/Support/CallSite.h" +#include "llvm/Support/CFG.h" +#include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/raw_ostream.h" +#include "llvm/Support/type_traits.h" -#include "DifferenceEngine.h" +#include using namespace llvm; diff --git a/tools/llvm-diff/DifferenceEngine.h b/tools/llvm-diff/DifferenceEngine.h index 9d0ebecc53..bc33131734 100644 --- a/tools/llvm-diff/DifferenceEngine.h +++ b/tools/llvm-diff/DifferenceEngine.h @@ -15,17 +15,19 @@ #ifndef _LLVM_DIFFERENCE_ENGINE_H_ #define _LLVM_DIFFERENCE_ENGINE_H_ +#include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/StringRef.h" + #include -#include -#include namespace llvm { + class Function; + class GlobalValue; + class Instruction; class LLVMContext; class Module; - class Function; class Twine; class Value; - class GlobalValue; /// A class for performing structural comparisons of LLVM assembly. class DifferenceEngine { diff --git a/tools/llvm-diff/llvm-diff.cpp b/tools/llvm-diff/llvm-diff.cpp index 1a3e1aeef8..9d8a7d3ec7 100644 --- a/tools/llvm-diff/llvm-diff.cpp +++ b/tools/llvm-diff/llvm-diff.cpp @@ -1,27 +1,36 @@ -#include -#include +//===-- llvm-diff.cpp - Module comparator command-line driver ---*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the command-line driver for the difference engine. +// +//===----------------------------------------------------------------------===// -#include -#include -#include - -// Required to parse .ll files. -#include -#include +#include "DifferenceEngine.h" -// Required to parse .bc files. -#include -#include +#include "llvm/Instructions.h" +#include "llvm/LLVMContext.h" +#include "llvm/Module.h" +#include "llvm/Type.h" +#include "llvm/Assembly/Parser.h" +#include "llvm/Bitcode/ReaderWriter.h" +#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/raw_ostream.h" +#include "llvm/Support/SourceMgr.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include -#include "DifferenceEngine.h" using namespace llvm; -- cgit v1.2.3-18-g5258