aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/IdentifierTable.cpp
diff options
context:
space:
mode:
authorJacques Pienaar <jpienaar@google.com>2020-05-06 13:48:36 -0700
committerJacques Pienaar <jpienaar@google.com>2020-05-07 12:33:36 -0700
commit5eae715a3115be2640d0fd37d0bd4771abf2ab9b (patch)
tree6208ae65271de1930076721c8819a3357d25b350 /clang/lib/Basic/IdentifierTable.cpp
parent5d0f2fdfa52b8b46995823b2b10ab6bbc40c4667 (diff)
downloadllvm-5eae715a3115be2640d0fd37d0bd4771abf2ab9b.zip
llvm-5eae715a3115be2640d0fd37d0bd4771abf2ab9b.tar.gz
llvm-5eae715a3115be2640d0fd37d0bd4771abf2ab9b.tar.bz2
[mlir] Add NamedAttrList
This is a wrapper around vector of NamedAttributes that keeps track of whether sorted and does some minimal effort to remain sorted (doing more, e.g., appending attributes in sorted order, could be done in follow up). It contains whether sorted and if a DictionaryAttr is queried, it caches the returned DictionaryAttr along with whether sorted. Change MutableDictionaryAttr to always return a non-null Attribute even when empty (reserve null cases for errors). To this end change the getter to take a context as input so that the empty DictionaryAttr could be queried. Also create one instance of the empty dictionary attribute that could be reused without needing to lock context etc. Update infer type op interface to use DictionaryAttr and use NamedAttrList to avoid incurring multiple conversion costs. Fix bug in sorting helper function. Differential Revision: https://reviews.llvm.org/D79463
Diffstat (limited to 'clang/lib/Basic/IdentifierTable.cpp')
0 files changed, 0 insertions, 0 deletions