diff options
author | Heejin Ahn <aheejin@gmail.com> | 2019-02-04 19:13:46 +0000 |
---|---|---|
committer | Heejin Ahn <aheejin@gmail.com> | 2019-02-04 19:13:46 +0000 |
commit | a1cc4ea7bb1a527917f4be87475e5931d034a4ca (patch) | |
tree | f51ce53d088c8f18531fb40d96318c8acd9ba362 /lld/wasm/InputChunks.cpp | |
parent | 18c56a07623e496480854f4927bcf1ba5213d177 (diff) | |
download | bcm5719-llvm-a1cc4ea7bb1a527917f4be87475e5931d034a4ca.tar.gz bcm5719-llvm-a1cc4ea7bb1a527917f4be87475e5931d034a4ca.zip |
[WebAssembly] clang-tidy (NFC)
Summary:
This patch fixes clang-tidy warnings on wasm-only files.
The list of checks used is:
`-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,readability-identifier-naming,modernize-*`
(LLVM's default .clang-tidy list is the same except it does not have
`modernize-*`.)
The list of fixes are:
- Variable names start with an uppercase letter
- Function names start with a lowercase letter
- Use `auto` when you use casts so the type is evident
Reviewers: sbc100
Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D57499
llvm-svn: 353076
Diffstat (limited to 'lld/wasm/InputChunks.cpp')
-rw-r--r-- | lld/wasm/InputChunks.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/wasm/InputChunks.cpp b/lld/wasm/InputChunks.cpp index ec3d2f85460..238c111ea39 100644 --- a/lld/wasm/InputChunks.cpp +++ b/lld/wasm/InputChunks.cpp @@ -22,7 +22,7 @@ using namespace llvm::support::endian; using namespace lld; using namespace lld::wasm; -static StringRef ReloctTypeToString(uint8_t RelocType) { +static StringRef reloctTypeToString(uint8_t RelocType) { switch (RelocType) { #define WASM_RELOC(NAME, REL) \ case REL: \ @@ -76,7 +76,7 @@ void InputChunk::verifyRelocTargets() const { warn("expected LEB at relocation site be 5-byte padded"); uint32_t ExpectedValue = File->calcExpectedValue(Rel); if (ExpectedValue != ExistingValue) - warn("unexpected existing value for " + ReloctTypeToString(Rel.Type) + + warn("unexpected existing value for " + reloctTypeToString(Rel.Type) + ": existing=" + Twine(ExistingValue) + " expected=" + Twine(ExpectedValue)); } @@ -102,7 +102,7 @@ void InputChunk::writeTo(uint8_t *Buf) const { for (const WasmRelocation &Rel : Relocations) { uint8_t *Loc = Buf + Rel.Offset + Off; uint32_t Value = File->calcNewValue(Rel); - LLVM_DEBUG(dbgs() << "apply reloc: type=" << ReloctTypeToString(Rel.Type) + LLVM_DEBUG(dbgs() << "apply reloc: type=" << reloctTypeToString(Rel.Type) << " addend=" << Rel.Addend << " index=" << Rel.Index << " value=" << Value << " offset=" << Rel.Offset << "\n"); |