From 4562e389a43caa2e30ebf277c12743edafe6a0ac Mon Sep 17 00:00:00 2001 From: River Riddle Date: Wed, 18 Dec 2019 09:28:48 -0800 Subject: NFC: Remove unnecessary 'llvm::' prefix from uses of llvm symbols declared in `mlir` namespace. Aside from being cleaner, this also makes the codebase more consistent. PiperOrigin-RevId: 286206974 --- mlir/lib/Support/StorageUniquer.cpp | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'mlir/lib/Support/StorageUniquer.cpp') diff --git a/mlir/lib/Support/StorageUniquer.cpp b/mlir/lib/Support/StorageUniquer.cpp index 3672c0f3759..cae4dce143f 100644 --- a/mlir/lib/Support/StorageUniquer.cpp +++ b/mlir/lib/Support/StorageUniquer.cpp @@ -39,7 +39,7 @@ struct StorageUniquerImpl { unsigned hashValue; /// An equality function for comparing with an existing storage instance. - llvm::function_ref isEqual; + function_ref isEqual; }; /// A utility wrapper object representing a hashed storage object. This class @@ -52,8 +52,8 @@ struct StorageUniquerImpl { /// Get or create an instance of a complex derived type. BaseStorage * getOrCreate(unsigned kind, unsigned hashValue, - llvm::function_ref isEqual, - llvm::function_ref ctorFn) { + function_ref isEqual, + function_ref ctorFn) { LookupKey lookupKey{kind, hashValue, isEqual}; // Check for an existing instance in read-only mode. @@ -83,7 +83,7 @@ struct StorageUniquerImpl { /// Get or create an instance of a simple derived type. BaseStorage * getOrCreate(unsigned kind, - llvm::function_ref ctorFn) { + function_ref ctorFn) { // Check for an existing instance in read-only mode. { llvm::sys::SmartScopedReader typeLock(mutex); @@ -107,8 +107,8 @@ struct StorageUniquerImpl { /// Erase an instance of a complex derived type. void erase(unsigned kind, unsigned hashValue, - llvm::function_ref isEqual, - llvm::function_ref cleanupFn) { + function_ref isEqual, + function_ref cleanupFn) { LookupKey lookupKey{kind, hashValue, isEqual}; // Acquire a writer-lock so that we can safely erase the type instance. @@ -127,9 +127,9 @@ struct StorageUniquerImpl { //===--------------------------------------------------------------------===// /// Utility to create and initialize a storage instance. - BaseStorage *initializeStorage( - unsigned kind, - llvm::function_ref ctorFn) { + BaseStorage * + initializeStorage(unsigned kind, + function_ref ctorFn) { BaseStorage *storage = ctorFn(allocator); storage->kind = kind; return storage; @@ -162,11 +162,11 @@ struct StorageUniquerImpl { }; // Unique types with specific hashing or storage constraints. - using StorageTypeSet = llvm::DenseSet; + using StorageTypeSet = DenseSet; StorageTypeSet storageTypes; // Unique types with just the kind. - llvm::DenseMap simpleTypes; + DenseMap simpleTypes; // Allocator to use when constructing derived type instances. StorageUniquer::StorageAllocator allocator; @@ -184,7 +184,7 @@ StorageUniquer::~StorageUniquer() {} /// complex storage. auto StorageUniquer::getImpl( unsigned kind, unsigned hashValue, - llvm::function_ref isEqual, + function_ref isEqual, std::function ctorFn) -> BaseStorage * { return impl->getOrCreate(kind, hashValue, isEqual, ctorFn); } @@ -199,9 +199,8 @@ auto StorageUniquer::getImpl( /// Implementation for erasing an instance of a derived type with complex /// storage. -void StorageUniquer::eraseImpl( - unsigned kind, unsigned hashValue, - llvm::function_ref isEqual, - std::function cleanupFn) { +void StorageUniquer::eraseImpl(unsigned kind, unsigned hashValue, + function_ref isEqual, + std::function cleanupFn) { impl->erase(kind, hashValue, isEqual, cleanupFn); } -- cgit v1.2.3