LLVM: include/llvm/ADT/StringSet.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14#ifndef LLVM_ADT_STRINGSET_H

15#define LLVM_ADT_STRINGSET_H

16

18

19namespace llvm {

20

21

22template

25

26public:

28 StringSet(std::initializer_list initializer) {

31 }

32 template explicit StringSet(Container &&C) {

33 for (auto &&Str : C)

35 }

37

40 }

41

42 template

44 for (auto it = begin; it != end; ++it)

46 }

47

48 template

49 std::pair<typename Base::iterator, bool>

52 }

53

54

56};

57

58}

59

60#endif

This file defines the StringMap class.

StringMapEntry - This is used to represent one value that is inserted into a StringMap.

int FindKey(StringRef Key) const

FindKey - Look up the bucket that contains the specified key.

StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...

std::pair< iterator, bool > try_emplace(StringRef Key, ArgsTy &&...Args)

Emplace a new element for the specified key into the map if the key isn't already in the map.

StringRef - Represent a constant reference to a string, i.e.

StringSet - A wrapper for StringMap that provides set-like functionality.

std::pair< typename Base::iterator, bool > insert(const StringMapEntry< ValueTy > &mapEntry)

void insert(InputIt begin, InputIt end)

StringSet(std::initializer_list< StringRef > initializer)

bool contains(StringRef key) const

Check if the set contains the given key.

std::pair< typename Base::iterator, bool > insert(StringRef key)

@ C

The default llvm calling convention, compatible with C.

This is an optimization pass for GlobalISel generic memory operations.