[lld] r326896 - [WebAssembly] Run clang-format. NFC
Nicholas Wilson via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 7 05:28:16 PST 2018
Author: ncw
Date: Wed Mar 7 05:28:16 2018
New Revision: 326896
URL: http://llvm.org/viewvc/llvm-project?rev=326896&view=rev
Log:
[WebAssembly] Run clang-format. NFC
Modified:
lld/trunk/wasm/Driver.cpp
lld/trunk/wasm/InputChunks.cpp
lld/trunk/wasm/InputChunks.h
lld/trunk/wasm/InputFiles.h
lld/trunk/wasm/OutputSections.cpp
lld/trunk/wasm/SymbolTable.h
lld/trunk/wasm/Symbols.h
lld/trunk/wasm/Writer.cpp
lld/trunk/wasm/WriterUtils.cpp
Modified: lld/trunk/wasm/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/Driver.cpp?rev=326896&r1=326895&r2=326896&view=diff
==============================================================================
--- lld/trunk/wasm/Driver.cpp (original)
+++ lld/trunk/wasm/Driver.cpp Wed Mar 7 05:28:16 2018
@@ -310,7 +310,7 @@ void LinkerDriver::link(ArrayRef<const c
&NullSignature);
// Handle the `--undefined <sym>` options.
- for (auto* Arg : Args.filtered(OPT_undefined))
+ for (auto *Arg : Args.filtered(OPT_undefined))
Symtab->addUndefinedFunction(Arg->getValue(), 0, nullptr, nullptr);
}
@@ -331,7 +331,7 @@ void LinkerDriver::link(ArrayRef<const c
// -u/--undefined since these undefined symbols have only names and no
// function signature, which means they cannot be written to the final
// output.
- for (auto* Arg : Args.filtered(OPT_undefined)) {
+ for (auto *Arg : Args.filtered(OPT_undefined)) {
Symbol *Sym = Symtab->find(Arg->getValue());
if (!Sym->isDefined())
error("function forced with --undefined not found: " + Sym->getName());
Modified: lld/trunk/wasm/InputChunks.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/InputChunks.cpp?rev=326896&r1=326895&r2=326896&view=diff
==============================================================================
--- lld/trunk/wasm/InputChunks.cpp (original)
+++ lld/trunk/wasm/InputChunks.cpp Wed Mar 7 05:28:16 2018
@@ -104,13 +104,15 @@ void InputChunk::writeRelocations(raw_os
}
void InputFunction::setOutputIndex(uint32_t Index) {
- DEBUG(dbgs() << "InputFunction::setOutputIndex: " << getName() << " -> " << Index << "\n");
+ DEBUG(dbgs() << "InputFunction::setOutputIndex: " << getName() << " -> "
+ << Index << "\n");
assert(!hasOutputIndex());
OutputIndex = Index;
}
void InputFunction::setTableIndex(uint32_t Index) {
- DEBUG(dbgs() << "InputFunction::setTableIndex: " << getName() << " -> " << Index << "\n");
+ DEBUG(dbgs() << "InputFunction::setTableIndex: " << getName() << " -> "
+ << Index << "\n");
assert(!hasTableIndex());
TableIndex = Index;
}
Modified: lld/trunk/wasm/InputChunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/InputChunks.h?rev=326896&r1=326895&r2=326896&view=diff
==============================================================================
--- lld/trunk/wasm/InputChunks.h (original)
+++ lld/trunk/wasm/InputChunks.h Wed Mar 7 05:28:16 2018
@@ -26,11 +26,11 @@
#include "lld/Common/ErrorHandler.h"
#include "llvm/Object/Wasm.h"
+using llvm::object::WasmSection;
using llvm::object::WasmSegment;
using llvm::wasm::WasmFunction;
using llvm::wasm::WasmRelocation;
using llvm::wasm::WasmSignature;
-using llvm::object::WasmSection;
namespace llvm {
class raw_ostream;
@@ -116,8 +116,7 @@ protected:
// combined to create the final output CODE section.
class InputFunction : public InputChunk {
public:
- InputFunction(const WasmSignature &S, const WasmFunction *Func,
- ObjFile *F)
+ InputFunction(const WasmSignature &S, const WasmFunction *Func, ObjFile *F)
: InputChunk(F, InputChunk::Function), Signature(S), Function(Func) {}
static bool classof(const InputChunk *C) {
Modified: lld/trunk/wasm/InputFiles.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/InputFiles.h?rev=326896&r1=326895&r2=326896&view=diff
==============================================================================
--- lld/trunk/wasm/InputFiles.h (original)
+++ lld/trunk/wasm/InputFiles.h Wed Mar 7 05:28:16 2018
@@ -25,8 +25,8 @@ using llvm::object::WasmSection;
using llvm::object::WasmSymbol;
using llvm::wasm::WasmGlobal;
using llvm::wasm::WasmImport;
-using llvm::wasm::WasmSignature;
using llvm::wasm::WasmRelocation;
+using llvm::wasm::WasmSignature;
namespace lld {
namespace wasm {
Modified: lld/trunk/wasm/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/OutputSections.cpp?rev=326896&r1=326895&r2=326896&view=diff
==============================================================================
--- lld/trunk/wasm/OutputSections.cpp (original)
+++ lld/trunk/wasm/OutputSections.cpp Wed Mar 7 05:28:16 2018
@@ -108,9 +108,8 @@ void CodeSection::writeTo(uint8_t *Buf)
memcpy(Buf, CodeSectionHeader.data(), CodeSectionHeader.size());
// Write code section bodies
- parallelForEach(Functions, [&](const InputChunk *Chunk) {
- Chunk->writeTo(Buf);
- });
+ parallelForEach(Functions,
+ [&](const InputChunk *Chunk) { Chunk->writeTo(Buf); });
}
uint32_t CodeSection::numRelocations() const {
Modified: lld/trunk/wasm/SymbolTable.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/SymbolTable.h?rev=326896&r1=326895&r2=326896&view=diff
==============================================================================
--- lld/trunk/wasm/SymbolTable.h (original)
+++ lld/trunk/wasm/SymbolTable.h Wed Mar 7 05:28:16 2018
@@ -16,8 +16,8 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/Support/raw_ostream.h"
-using llvm::wasm::WasmSignature;
using llvm::wasm::WasmGlobalType;
+using llvm::wasm::WasmSignature;
namespace lld {
namespace wasm {
Modified: lld/trunk/wasm/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/Symbols.h?rev=326896&r1=326895&r2=326896&view=diff
==============================================================================
--- lld/trunk/wasm/Symbols.h (original)
+++ lld/trunk/wasm/Symbols.h Wed Mar 7 05:28:16 2018
@@ -16,9 +16,9 @@
using llvm::object::Archive;
using llvm::object::WasmSymbol;
-using llvm::wasm::WasmSignature;
using llvm::wasm::WasmGlobal;
using llvm::wasm::WasmGlobalType;
+using llvm::wasm::WasmSignature;
using llvm::wasm::WasmSymbolType;
namespace lld {
@@ -48,8 +48,8 @@ public:
Kind kind() const { return SymbolKind; }
bool isDefined() const {
- return SymbolKind == DefinedFunctionKind ||
- SymbolKind == DefinedDataKind || SymbolKind == DefinedGlobalKind;
+ return SymbolKind == DefinedFunctionKind || SymbolKind == DefinedDataKind ||
+ SymbolKind == DefinedGlobalKind;
}
bool isUndefined() const {
Modified: lld/trunk/wasm/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/Writer.cpp?rev=326896&r1=326895&r2=326896&view=diff
==============================================================================
--- lld/trunk/wasm/Writer.cpp (original)
+++ lld/trunk/wasm/Writer.cpp Wed Mar 7 05:28:16 2018
@@ -93,8 +93,7 @@ private:
void layoutMemory();
void createHeader();
void createSections();
- SyntheticSection *createSyntheticSection(uint32_t Type,
- StringRef Name = "");
+ SyntheticSection *createSyntheticSection(uint32_t Type, StringRef Name = "");
// Builtin sections
void createTypeSection();
@@ -472,8 +471,11 @@ void Writer::createLinkingSection() {
Sub.writeTo(OS);
}
- struct ComdatEntry { unsigned Kind; uint32_t Index; };
- std::map<StringRef,std::vector<ComdatEntry>> Comdats;
+ struct ComdatEntry {
+ unsigned Kind;
+ uint32_t Index;
+ };
+ std::map<StringRef, std::vector<ComdatEntry>> Comdats;
for (const InputFunction *F : InputFunctions) {
StringRef Comdat = F->getComdat();
@@ -873,9 +875,9 @@ void Writer::createCtorFunction() {
}
const WasmSignature *Sig = WasmSym::CallCtors->getFunctionType();
- SyntheticFunction *F = make<SyntheticFunction>(
- *Sig, toArrayRef(Saver.save(FunctionBody)),
- WasmSym::CallCtors->getName());
+ SyntheticFunction *F =
+ make<SyntheticFunction>(*Sig, toArrayRef(Saver.save(FunctionBody)),
+ WasmSym::CallCtors->getName());
F->setOutputIndex(FunctionIndex);
F->Live = true;
Modified: lld/trunk/wasm/WriterUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/WriterUtils.cpp?rev=326896&r1=326895&r2=326896&view=diff
==============================================================================
--- lld/trunk/wasm/WriterUtils.cpp (original)
+++ lld/trunk/wasm/WriterUtils.cpp Wed Mar 7 05:28:16 2018
@@ -195,5 +195,5 @@ std::string lld::toString(const WasmSign
std::string lld::toString(const WasmGlobalType &Sig) {
return (Sig.Mutable ? "var " : "const ") +
- toString(static_cast<ValType>(Sig.Type));
+ toString(static_cast<ValType>(Sig.Type));
}
More information about the llvm-commits
mailing list