diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-07-29 23:03:40 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-07-29 23:03:40 +0000 |
commit | 2e6a87b2816edb04819f2e02a1674677596f6087 (patch) | |
tree | adf2b9f4f0027cddcc80f28b7e44ca223caf5b7e /llvm/lib/Bitcode/Writer | |
parent | 72b07e8578b9ea619ba22244d29a2be338e8caea (diff) | |
download | bcm5719-llvm-2e6a87b2816edb04819f2e02a1674677596f6087.tar.gz bcm5719-llvm-2e6a87b2816edb04819f2e02a1674677596f6087.zip |
UseListOrder: Create a struct around OrderMap, NFC
llvm-svn: 214241
Diffstat (limited to 'llvm/lib/Bitcode/Writer')
-rw-r--r-- | llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp index 67634f1ac6c..5624e02a5c8 100644 --- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp +++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp @@ -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) { |