[Mlir-commits] [mlir] 9dc168b - [MLIR][NFC] Organize the ordering in LLVM.h

Tres Popp llvmlistbot at llvm.org
Mon Apr 27 08:05:54 PDT 2020


Author: Tres Popp
Date: 2020-04-27T17:05:43+02:00
New Revision: 9dc168b37ca6ed77d2de7892bd295feb7eea5808

URL: https://github.com/llvm/llvm-project/commit/9dc168b37ca6ed77d2de7892bd295feb7eea5808
DIFF: https://github.com/llvm/llvm-project/commit/9dc168b37ca6ed77d2de7892bd295feb7eea5808.diff

LOG: [MLIR][NFC] Organize the ordering in LLVM.h

Summary:
Order classes by purpose and alphabetically to make it slightly easier
to read through the file.

Reviewers: ftynse!

Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, grosul1, frgossen, Kayjukh, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78914

Added: 
    

Modified: 
    mlir/include/mlir/Support/LLVM.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Support/LLVM.h b/mlir/include/mlir/Support/LLVM.h
index 1887188bf3e2..17e020442eb4 100644
--- a/mlir/include/mlir/Support/LLVM.h
+++ b/mlir/include/mlir/Support/LLVM.h
@@ -25,38 +25,54 @@
 
 // Forward declarations.
 namespace llvm {
-// Containers.
+// String types
+template <unsigned N>
+class SmallString;
 class StringRef;
 class StringLiteral;
 class Twine;
-template <typename T> class SmallPtrSetImpl;
-template <typename T, unsigned N> class SmallPtrSet;
-template <typename T> class SmallVectorImpl;
-template <typename T, unsigned N> class SmallVector;
-template <unsigned N> class SmallString;
+
+// Containers.
 template <typename T> class ArrayRef;
-template <typename T> class MutableArrayRef;
-template <typename T> class TinyPtrVector;
-template <typename T> class Optional;
-template <typename... PT> class PointerUnion;
 namespace detail {
 template <typename KeyT, typename ValueT> struct DenseMapPair;
-}
-template <typename T> struct DenseMapInfo;
-template <typename ValueT, typename ValueInfoT> class DenseSet;
+} // namespace detail
 template <typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
 class DenseMap;
-template <typename Fn> class function_ref;
-template <typename IteratorT> class iterator_range;
-template <typename T, typename ResultT> class TypeSwitch;
+template <typename T>
+struct DenseMapInfo;
+template <typename ValueT, typename ValueInfoT>
+class DenseSet;
 class MallocAllocator;
+template <typename T>
+class MutableArrayRef;
+template <typename T>
+class Optional;
+template <typename... PT>
+class PointerUnion;
+template <typename T, unsigned N>
+class SmallPtrSet;
+template <typename T>
+class SmallPtrSetImpl;
+template <typename T, unsigned N>
+class SmallVector;
+template <typename T>
+class SmallVectorImpl;
 template <typename AllocatorTy>
 class StringSet;
+template <typename T>
+class TinyPtrVector;
+template <typename T, typename ResultT>
+class TypeSwitch;
 
 // Other common classes.
-class raw_ostream;
 class APInt;
 class APFloat;
+template <typename Fn>
+class function_ref;
+template <typename IteratorT>
+class iterator_range;
+class raw_ostream;
 } // end namespace llvm
 
 namespace mlir {
@@ -68,6 +84,14 @@ using llvm::dyn_cast_or_null;
 using llvm::isa;
 using llvm::isa_and_nonnull;
 
+// String types
+using llvm::SmallString;
+using llvm::StringLiteral;
+using llvm::StringRef;
+using llvm::Twine;
+
+// Container Related types
+//
 // Containers.
 using llvm::ArrayRef;
 using llvm::DenseMapInfo;
@@ -79,27 +103,24 @@ template <typename ValueT, typename ValueInfoT = DenseMapInfo<ValueT>>
 using DenseSet = llvm::DenseSet<ValueT, ValueInfoT>;
 template <typename AllocatorTy = llvm::MallocAllocator>
 using StringSet = llvm::StringSet<AllocatorTy>;
-template <typename Fn> using function_ref = llvm::function_ref<Fn>;
-using llvm::iterator_range;
 using llvm::MutableArrayRef;
 using llvm::None;
 using llvm::Optional;
 using llvm::PointerUnion;
 using llvm::SmallPtrSet;
 using llvm::SmallPtrSetImpl;
-using llvm::SmallString;
 using llvm::SmallVector;
 using llvm::SmallVectorImpl;
-using llvm::StringLiteral;
-using llvm::StringRef;
 using llvm::TinyPtrVector;
-using llvm::Twine;
 template <typename T, typename ResultT = void>
 using TypeSwitch = llvm::TypeSwitch<T, ResultT>;
 
 // Other common classes.
 using llvm::APFloat;
 using llvm::APInt;
+template <typename Fn>
+using function_ref = llvm::function_ref<Fn>;
+using llvm::iterator_range;
 using llvm::raw_ostream;
 } // namespace mlir
 


        


More information about the Mlir-commits mailing list