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/IceDefs.h b/src/IceDefs.h
index 051edbb..55e09ac 100644
--- a/src/IceDefs.h
+++ b/src/IceDefs.h
@@ -126,9 +126,7 @@
// Use alignas(MaxCacheLineSize) to isolate variables/fields that
// might be contended while multithreading. Assumes the maximum cache
// line size is 64.
-enum {
- MaxCacheLineSize = 64
-};
+enum { MaxCacheLineSize = 64 };
// Use ICE_CACHELINE_BOUNDARY to force the next field in a declaration
// list to be aligned to the next cache line.
#define ICE_CACHELINE_BOUNDARY \
@@ -179,12 +177,7 @@
typedef std::mutex GlobalLockType;
-enum ErrorCodes {
- EC_None = 0,
- EC_Args,
- EC_Bitcode,
- EC_Translation
-};
+enum ErrorCodes { EC_None = 0, EC_Args, EC_Bitcode, EC_Translation };
// Wrapper around std::error_code for allowing multiple errors to be
// folded into one. The current implementation keeps track of the