IndexedMap: Default to SmallVector<T, 0>

This looks ridiculous but SmallVector's realloc tricks really help with
large vectors of PODs, such as our virtreg IndexedMap.

llvm-svn: 230866
This commit is contained in:
Benjamin Kramer 2015-02-28 20:15:07 +00:00
parent 49a1132976
commit 4b7dd64d82
1 changed files with 2 additions and 2 deletions

View File

@ -21,16 +21,16 @@
#define LLVM_ADT_INDEXEDMAP_H
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include <cassert>
#include <functional>
#include <vector>
namespace llvm {
template <typename T, typename ToIndexT = llvm::identity<unsigned> >
class IndexedMap {
typedef typename ToIndexT::argument_type IndexT;
typedef std::vector<T> StorageT;
typedef SmallVector<T, 0> StorageT;
StorageT storage_;
T nullVal_;
ToIndexT toIndex_;