Subzero: Use a "known" version of clang-format.
There are two problems with "make format" and "make format-diff" in
Makefile.standalone:
1. You have to make sure clang-format and clang-format-diff.py are
available in $PATH.
2. Different users may have different versions installed (even for the
same user on different machines), leading to whitespace wars. Can't we
all just get along?
Since the normal LLVM build that Subzero depends on also exposes and
builds clang-format and friends, we might as well use it. The
clang-format binary is found in $LLVM_BIN_PATH, and clang-format-diff.py
is found relative to $LLVM_SRC_PATH. As long as the user's LLVM build
is fairly up to date, whitespace wars are unlikely.
Given this, there's a much higher incentive to use "make format"
regularly instead of "make format-diff". In particular, inline comments
on variable/field declaration lists can get lined up more nicely by
looking at the entire context, rather than the small diff window.
BUG= none
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/877003003
diff --git a/src/IceCfg.h b/src/IceCfg.h
index 5f827f5..71f0a0d 100644
--- a/src/IceCfg.h
+++ b/src/IceCfg.h
@@ -95,9 +95,7 @@
const IceString &getIdentifierName(IdentifierIndexType Index) const {
return IdentifierNames[Index];
}
- enum {
- IdentifierIndexInvalid = -1
- };
+ enum { IdentifierIndexInvalid = -1 };
// Manage instruction numbering.
InstNumberT newInstNumber() { return NextInstNumber++; }
@@ -201,7 +199,7 @@
std::vector<IceString> IdentifierNames;
InstNumberT NextInstNumber;
VarList Variables;
- VarList Args; // subset of Variables, in argument order
+ VarList Args; // subset of Variables, in argument order
VarList ImplicitArgs; // subset of Variables
std::unique_ptr<ArenaAllocator<>> Allocator;
std::unique_ptr<Liveness> Live;