Skip to content

Follow LLVM style guidelines for use of data structures #471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mattmccutchen-cci opened this issue Mar 5, 2021 · 1 comment
Open
Labels

Comments

@mattmccutchen-cci
Copy link
Member

From review of a PR to Microsoft:

I noticed that clang/include/clang/3C/ProgramInfo.h uses std::map and clang/lib/3C.cpp uses
std::vector. Llvm recommends that: "llvm::DenseMap should almost always be used instead of std::map or
std::unordered_map, and llvm::SmallVector should usually be used instead of std::vector" .

Here are the LLVM guideline and the Programmer's Manual section on data structures.

@sulekhark
Copy link

Thank you! Please also consider using llvm::DenseSet or llvm::SmallSet instead of std::set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants