This is an archive of the discontinued LLVM Phabricator instance.

[LazyCallGraph] Reformat the code in accordance with the code style. NFC
ClosedPublic

Authored by psamolysov on Aug 28 2022, 3:04 AM.

Details

Summary

Also, some local variables have been renamed in accordance with the code
style as well as structure bindings from C++17 were introduced instead of
std::tie.

Diff Detail

Event Timeline

psamolysov created this revision.Aug 28 2022, 3:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 28 2022, 3:04 AM
psamolysov requested review of this revision.Aug 28 2022, 3:04 AM
aeubanks accepted this revision.Aug 28 2022, 1:12 PM

lg, as long as the removed asserts don't break the expensive checks build

This revision is now accepted and ready to land.Aug 28 2022, 1:12 PM

@aeubanks Thank you for the review. This patch doesn't remove any asserts just reformats them. At least it should...

More structure bindings have been inserted in the foreach loops. Also, some inserts to maps were replaced with the try_emplace operations in order to eliminate redundant copies of pairs (but as I see those pairs are small enough but "no-copy" is better than "copy" even whenever this "no-copy" is for free).

I mean that code in #ifdef EXPENSIVE_CHECKS may use headers that aren't otherwise used, e.g. the existing
#include "llvm/ADT/ScopeExit.h"

but if that's fine then still lgtm

@aeubanks Oh, thank you for the comment. I tried to explicitly define EXPENSIVE_CHECK at the beginning of the LazyCallGraph.cpp file and LLVM has successfully been built. So, I've landed the patch.