[Driver] Avoid repeated map lookups (NFC) (#122625)
This commit is contained in:
parent
5e4b41c1d5
commit
4f6fabd11a
1 changed files with 2 additions and 2 deletions
|
|
@ -2534,8 +2534,8 @@ enum {
|
|||
static unsigned PrintActions1(const Compilation &C, Action *A,
|
||||
std::map<Action *, unsigned> &Ids,
|
||||
Twine Indent = {}, int Kind = TopLevelAction) {
|
||||
if (Ids.count(A)) // A was already visited.
|
||||
return Ids[A];
|
||||
if (auto It = Ids.find(A); It != Ids.end()) // A was already visited.
|
||||
return It->second;
|
||||
|
||||
std::string str;
|
||||
llvm::raw_string_ostream os(str);
|
||||
|
|
|
|||
Loading…
Reference in a new issue