mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
b856d555b0
Comparing ~0UL with an unsigned will always return false when long is 64 bits long. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155568 91177308-0d34-0410-b5e6-96231b3b80d8
38 lines
1.3 KiB
C++
38 lines
1.3 KiB
C++
//===- llvm/ADT/SmallMap.h - 'Normally small' pointer set -------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file defines the SmallMap class.
|
|
// SmallMap is DenseMap compatible MultiImplMap.
|
|
// It uses FlatArrayMap for small mode, and DenseMap for big mode.
|
|
// See MultiMapImpl comments for more details on the algorithm is used.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef SMALLPTRMAP_H_
|
|
#define SMALLPTRMAP_H_
|
|
|
|
#include "llvm/ADT/DenseMap.h"
|
|
#include "llvm/ADT/FlatArrayMap.h"
|
|
#include "llvm/ADT/MultiImplMap.h"
|
|
|
|
namespace llvm {
|
|
|
|
//===--------------------------------------------------------------------===//
|
|
/// SmallMap is wrapper around MultiImplMap. It uses FlatArrayMap for
|
|
/// small mode, and DenseMap for big mode.
|
|
template <typename KeyTy, typename MappedTy, unsigned N = 16>
|
|
class SmallMap : public MultiImplMap<
|
|
FlatArrayMap<KeyTy, MappedTy, N>,
|
|
DenseMap<KeyTy, MappedTy>,
|
|
N, true> {
|
|
};
|
|
}
|
|
|
|
#endif /* SMALLPTRMAP_H_ */
|