[llvm] r214241 - UseListOrder: Create a struct around OrderMap, NFC
Duncan P. N. Exon Smith
dexonsmith at apple.com
Tue Jul 29 16:03:40 PDT 2014
Author: dexonsmith
Date: Tue Jul 29 18:03:40 2014
New Revision: 214241
URL: http://llvm.org/viewvc/llvm-project?rev=214241&view=rev
Log:
UseListOrder: Create a struct around OrderMap, NFC
Modified:
llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp
Modified: llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp?rev=214241&r1=214240&r2=214241&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp (original)
+++ llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp Tue Jul 29 18:03:40 2014
@@ -26,7 +26,15 @@
using namespace llvm;
namespace {
-typedef DenseMap<const Value *, std::pair<unsigned, bool>> OrderMap;
+struct OrderMap {
+ DenseMap<const Value *, std::pair<unsigned, bool>> IDs;
+
+ unsigned size() const { return IDs.size(); }
+ std::pair<unsigned, bool> &operator[](const Value *V) { return IDs[V]; }
+ std::pair<unsigned, bool> lookup(const Value *V) const {
+ return IDs.lookup(V);
+ }
+};
}
static void orderValue(const Value *V, OrderMap &OM) {
More information about the llvm-commits
mailing list