Closed
Description
Our supplementary LLVM bindings, found in the src/rustllvm/
directory, are a mess. Even basic things like brace style, naming convention, and indentation differ between functions in the same file. This makes it more painful to work with than it has to be. We should settle on a coding style and run clang-format
over the file.
Which style is chosen is less important than that it's used consistently, but since that library is dealing with LLVM APIs and little else, the LLVM style seems like the obvious candidate. It's also built into clang-format
so no configuration is needed.
Concrete tasks:
- Run
clang-format
with any style (Making code style consistent for src/rustllvm (#38688) #38701) - Using
nullptr
instead ofNULL
(Making code style consistent for src/rustllvm (#38688) #38701) - Consistent capitalization style for functions and types and locals (Improve naming style in rustllvm. #38745)
- Picking consistent abbreviation styles for commonly used names (e.g.,
Val
vsValue
) (Improve naming style in rustllvm. #38745)