projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72024ad
)
[TableGen] Don't separately search for DefaultMode when we're going to iterate the...
author
Simon Pilgrim
<llvm-dev@redking.me.uk>
Fri, 17 Aug 2018 17:45:15 +0000
(17:45 +0000)
committer
Simon Pilgrim
<llvm-dev@redking.me.uk>
Fri, 17 Aug 2018 17:45:15 +0000
(17:45 +0000)
llvm-svn: 340055
llvm/utils/TableGen/InfoByHwMode.h
patch
|
blob
|
history
diff --git
a/llvm/utils/TableGen/InfoByHwMode.h
b/llvm/utils/TableGen/InfoByHwMode.h
index
4838198
..
7be4678
100644
(file)
--- a/
llvm/utils/TableGen/InfoByHwMode.h
+++ b/
llvm/utils/TableGen/InfoByHwMode.h
@@
-47,10
+47,12
@@
std::vector<unsigned> union_modes(const InfoByHwMode<InfoT> &A,
for (const auto &P : B)
U.insert(P.first);
// Make sure that the default mode is last on the list.
- bool HasDefault =
U.count(DefaultMode)
;
+ bool HasDefault =
false
;
for (unsigned M : U)
if (M != DefaultMode)
V.push_back(M);
+ else
+ HasDefault = true;
if (HasDefault)
V.push_back(DefaultMode);
return V;