From 2e6a87b2816edb04819f2e02a1674677596f6087 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Tue, 29 Jul 2014 23:03:40 +0000 Subject: [PATCH] UseListOrder: Create a struct around OrderMap, NFC llvm-svn: 214241 --- llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp index 67634f1..5624e02 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> OrderMap; +struct OrderMap { + DenseMap> IDs; + + unsigned size() const { return IDs.size(); } + std::pair &operator[](const Value *V) { return IDs[V]; } + std::pair lookup(const Value *V) const { + return IDs.lookup(V); + } +}; } static void orderValue(const Value *V, OrderMap &OM) { -- 2.7.4