OSDN Git Service

Subzero: Use a "known" version of clang-format.
authorJim Stichnoth <stichnot@chromium.org>
Tue, 27 Jan 2015 20:53:53 +0000 (12:53 -0800)
committerJim Stichnoth <stichnot@chromium.org>
Tue, 27 Jan 2015 20:53:53 +0000 (12:53 -0800)
commitdd842dbb57b825ed0dd6400648d0602b74c90aff
treee79280629f8a03f538495bd2407c2de7f05430db
parentfa4efea5413aa993e8e6ba10579e0934d1a3e784
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
51 files changed:
Makefile.standalone
crosstest/mem_intrin.cpp
crosstest/mem_intrin_main.cpp
crosstest/test_arith_main.cpp
crosstest/test_bitmanip.h
crosstest/test_bitmanip_main.cpp
crosstest/test_calling_conv.cpp
crosstest/test_calling_conv.h
crosstest/test_calling_conv_main.cpp
crosstest/test_cast_main.cpp
crosstest/test_fcmp_main.cpp
crosstest/test_global.cpp
crosstest/test_global_main.cpp
crosstest/test_icmp_main.cpp
crosstest/test_select_main.cpp
crosstest/test_stacksave.c
crosstest/test_stacksave.h
crosstest/test_stacksave_main.c
crosstest/test_sync_atomic.cpp
crosstest/test_sync_atomic.h
crosstest/test_sync_atomic_main.cpp
runtime/szrt.c
src/IceCfg.h
src/IceCfgNode.cpp
src/IceCfgNode.h
src/IceConverter.cpp
src/IceDefs.h
src/IceELFObjectWriter.cpp
src/IceGlobalContext.h
src/IceGlobalInits.cpp
src/IceGlobalInits.h
src/IceInst.cpp
src/IceInstX8632.cpp
src/IceInstX8632.h
src/IceIntrinsics.cpp
src/IceIntrinsics.h
src/IceOperand.cpp
src/IceOperand.h
src/IceRNG.cpp
src/IceTargetLowering.cpp
src/IceTargetLowering.h
src/IceTargetLoweringX8632.cpp
src/IceTimerTree.h
src/IceTypes.cpp
src/IceTypes.h
src/PNaClTranslator.cpp
src/assembler.h
src/llvm2ice.cpp
unittest/BitcodeMunge.cpp
unittest/BitcodeMunge.h
unittest/IceParseInstsTest.cpp