Make the header self-contained and follow #include guidelines.
authorJohn McCall <rjmccall@apple.com>
Thu, 29 Jul 2010 18:08:23 +0000 (18:08 +0000)
committerJohn McCall <rjmccall@apple.com>
Thu, 29 Jul 2010 18:08:23 +0000 (18:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109774 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-diff/DifferenceEngine.cpp
tools/llvm-diff/DifferenceEngine.h
tools/llvm-diff/llvm-diff.cpp

index 55b1a362a831a48e2bb1e9907f42be24f38c710b..7436d1ed4e3cb74880c8ed123c20a815deea62b7 100644 (file)
@@ -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 <utility>
-
-#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/Module.h>
-#include <llvm/Function.h>
-#include <llvm/Instructions.h>
-#include <llvm/Support/CFG.h>
+#include "DifferenceEngine.h"
 
 
-#include <llvm/Support/raw_ostream.h>
-#include <llvm/Support/type_traits.h>
-#include <llvm/Support/ErrorHandling.h>
-#include <llvm/Support/CallSite.h>
+#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 <utility>
 
 using namespace llvm;
 
 
 using namespace llvm;
 
index 9d0ebecc53d152fff629b8745b82d1b95084bd8c..bc3313173449e5cc9602ae8ef21fa28b5464ac6f 100644 (file)
 #ifndef _LLVM_DIFFERENCE_ENGINE_H_
 #define _LLVM_DIFFERENCE_ENGINE_H_
 
 #ifndef _LLVM_DIFFERENCE_ENGINE_H_
 #define _LLVM_DIFFERENCE_ENGINE_H_
 
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/StringRef.h"
+
 #include <utility>
 #include <utility>
-#include <llvm/ADT/SmallVector.h>
-#include <llvm/ADT/StringRef.h>
 
 namespace llvm {
 
 namespace llvm {
+  class Function;
+  class GlobalValue;
+  class Instruction;
   class LLVMContext;
   class Module;
   class LLVMContext;
   class Module;
-  class Function;
   class Twine;
   class Value;
   class Twine;
   class Value;
-  class GlobalValue;
 
   /// A class for performing structural comparisons of LLVM assembly.
   class DifferenceEngine {
 
   /// A class for performing structural comparisons of LLVM assembly.
   class DifferenceEngine {
index 1a3e1aeef8a5ffebad625fbd8f20d8ca54eda49d..9d8a7d3ec7a3e5cc36c0e0cc7f48373425a89b8d 100644 (file)
@@ -1,27 +1,36 @@
-#include <string>
-#include <utility>
+//===-- 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 <llvm/ADT/StringRef.h>
-#include <llvm/ADT/SmallVector.h>
-#include <llvm/ADT/DenseMap.h>
-
-// Required to parse .ll files.
-#include <llvm/Support/SourceMgr.h>
-#include <llvm/Assembly/Parser.h>
+#include "DifferenceEngine.h"
 
 
-// Required to parse .bc files.
-#include <llvm/Support/MemoryBuffer.h>
-#include <llvm/Bitcode/ReaderWriter.h>
+#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 <llvm/Support/CommandLine.h>
-#include <llvm/Support/raw_ostream.h>
-#include <llvm/Support/ErrorHandling.h>
-#include <llvm/LLVMContext.h>
-#include <llvm/Module.h>
-#include <llvm/Type.h>
-#include <llvm/Instructions.h>
+#include <string>
+#include <utility>
 
 
-#include "DifferenceEngine.h"
 
 using namespace llvm;
 
 
 using namespace llvm;