[lld] r323622 - clang format
Sam Clegg via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 28 11:57:02 PST 2018
Author: sbc
Date: Sun Jan 28 11:57:02 2018
New Revision: 323622
URL: http://llvm.org/viewvc/llvm-project?rev=323622&view=rev
Log:
clang format
Modified:
lld/trunk/wasm/InputChunks.h
lld/trunk/wasm/InputFiles.cpp
lld/trunk/wasm/SymbolTable.cpp
lld/trunk/wasm/SymbolTable.h
lld/trunk/wasm/Symbols.cpp
lld/trunk/wasm/Symbols.h
Modified: lld/trunk/wasm/InputChunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/InputChunks.h?rev=323622&r1=323621&r2=323622&view=diff
==============================================================================
--- lld/trunk/wasm/InputChunks.h (original)
+++ lld/trunk/wasm/InputChunks.h Sun Jan 28 11:57:02 2018
@@ -122,7 +122,9 @@ public:
const ObjFile *F)
: InputChunk(F, InputChunk::Function), Signature(S), Function(Func) {}
- static bool classof(const InputChunk *C) { return C->kind() == InputChunk::Function; }
+ static bool classof(const InputChunk *C) {
+ return C->kind() == InputChunk::Function;
+ }
virtual StringRef getName() const { return Function->Name; }
StringRef getComdat() const override { return Function->Comdat; }
Modified: lld/trunk/wasm/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/InputFiles.cpp?rev=323622&r1=323621&r2=323622&view=diff
==============================================================================
--- lld/trunk/wasm/InputFiles.cpp (original)
+++ lld/trunk/wasm/InputFiles.cpp Sun Jan 28 11:57:02 2018
@@ -259,8 +259,8 @@ void ObjFile::initializeSymbols() {
case WasmSymbol::SymbolType::GLOBAL_EXPORT: {
InputSegment *Segment = getSegment(WasmSym);
if (!isExcludedByComdat(Segment)) {
- S = createDefined(WasmSym, Symbol::Kind::DefinedGlobalKind,
- Segment, getGlobalValue(WasmSym));
+ S = createDefined(WasmSym, Symbol::Kind::DefinedGlobalKind, Segment,
+ getGlobalValue(WasmSym));
break;
} else {
Segment->Discarded = true;
@@ -306,8 +306,7 @@ Symbol *ObjFile::createDefined(const Was
S->update(Kind, this, Sym.Flags, Chunk, Address);
return S;
}
- return Symtab->addDefined(Sym.Name, Kind, Sym.Flags, this, Chunk,
- Address);
+ return Symtab->addDefined(Sym.Name, Kind, Sym.Flags, this, Chunk, Address);
}
void ArchiveFile::parse() {
Modified: lld/trunk/wasm/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/SymbolTable.cpp?rev=323622&r1=323621&r2=323622&view=diff
==============================================================================
--- lld/trunk/wasm/SymbolTable.cpp (original)
+++ lld/trunk/wasm/SymbolTable.cpp Sun Jan 28 11:57:02 2018
@@ -121,8 +121,8 @@ static void checkSymbolTypes(const Symbo
static void checkSymbolTypes(const Symbol &Existing, const InputFile &F,
Symbol::Kind Kind, const InputChunk *Chunk) {
- const WasmSignature* Sig = nullptr;
- if (auto* F = dyn_cast_or_null<InputFunction>(Chunk))
+ const WasmSignature *Sig = nullptr;
+ if (auto *F = dyn_cast_or_null<InputFunction>(Chunk))
Sig = &F->Signature;
return checkSymbolTypes(Existing, F, Kind, Sig);
}
@@ -163,8 +163,8 @@ Symbol *SymbolTable::addDefinedGlobal(St
}
Symbol *SymbolTable::addDefined(StringRef Name, Symbol::Kind Kind,
- uint32_t Flags, InputFile *F,
- InputChunk *Chunk, uint32_t Address) {
+ uint32_t Flags, InputFile *F, InputChunk *Chunk,
+ uint32_t Address) {
DEBUG(dbgs() << "addDefined: " << Name << " addr:" << Address << "\n");
Symbol *S;
bool WasInserted;
Modified: lld/trunk/wasm/SymbolTable.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/SymbolTable.h?rev=323622&r1=323621&r2=323622&view=diff
==============================================================================
--- lld/trunk/wasm/SymbolTable.h (original)
+++ lld/trunk/wasm/SymbolTable.h Sun Jan 28 11:57:02 2018
@@ -50,8 +50,8 @@ public:
ObjFile *findComdat(StringRef Name) const;
Symbol *addDefined(StringRef Name, Symbol::Kind Kind, uint32_t Flags,
- InputFile *F,
- InputChunk *Chunk = nullptr, uint32_t Address = 0);
+ InputFile *F, InputChunk *Chunk = nullptr,
+ uint32_t Address = 0);
Symbol *addUndefined(StringRef Name, Symbol::Kind Kind, uint32_t Flags,
InputFile *F, const WasmSignature *Signature = nullptr);
Symbol *addUndefinedFunction(StringRef Name, const WasmSignature *Type);
Modified: lld/trunk/wasm/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/Symbols.cpp?rev=323622&r1=323621&r2=323622&view=diff
==============================================================================
--- lld/trunk/wasm/Symbols.cpp (original)
+++ lld/trunk/wasm/Symbols.cpp Sun Jan 28 11:57:02 2018
@@ -39,17 +39,18 @@ void Symbol::setFunctionType(const WasmS
uint32_t Symbol::getVirtualAddress() const {
assert(isGlobal());
DEBUG(dbgs() << "getVirtualAddress: " << getName() << "\n");
- return Chunk ? dyn_cast<InputSegment>(Chunk)->translateVA(VirtualAddress) : VirtualAddress;
+ return Chunk ? dyn_cast<InputSegment>(Chunk)->translateVA(VirtualAddress)
+ : VirtualAddress;
}
bool Symbol::hasOutputIndex() const {
- if (auto* F = dyn_cast_or_null<InputFunction>(Chunk))
+ if (auto *F = dyn_cast_or_null<InputFunction>(Chunk))
return F->hasOutputIndex();
return OutputIndex.hasValue();
}
uint32_t Symbol::getOutputIndex() const {
- if (auto* F = dyn_cast_or_null<InputFunction>(Chunk))
+ if (auto *F = dyn_cast_or_null<InputFunction>(Chunk))
return F->getOutputIndex();
return OutputIndex.getValue();
}
@@ -68,13 +69,13 @@ void Symbol::setOutputIndex(uint32_t Ind
}
uint32_t Symbol::getTableIndex() const {
- if (auto* F = dyn_cast_or_null<InputFunction>(Chunk))
+ if (auto *F = dyn_cast_or_null<InputFunction>(Chunk))
return F->getTableIndex();
return TableIndex.getValue();
}
bool Symbol::hasTableIndex() const {
- if (auto* F = dyn_cast_or_null<InputFunction>(Chunk))
+ if (auto *F = dyn_cast_or_null<InputFunction>(Chunk))
return F->hasTableIndex();
return TableIndex.hasValue();
}
@@ -83,7 +84,7 @@ void Symbol::setTableIndex(uint32_t Inde
// For imports, we set the table index here on the Symbol; for defined
// functions we set the index on the InputFunction so that we don't export
// the same thing twice (keeps the table size down).
- if (auto* F = dyn_cast_or_null<InputFunction>(Chunk)) {
+ if (auto *F = dyn_cast_or_null<InputFunction>(Chunk)) {
F->setTableIndex(Index);
return;
}
@@ -92,8 +93,7 @@ void Symbol::setTableIndex(uint32_t Inde
TableIndex = Index;
}
-void Symbol::update(Kind K, InputFile *F, uint32_t Flags_,
- InputChunk *Chunk_,
+void Symbol::update(Kind K, InputFile *F, uint32_t Flags_, InputChunk *Chunk_,
uint32_t Address) {
SymbolKind = K;
File = F;
Modified: lld/trunk/wasm/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/Symbols.h?rev=323622&r1=323621&r2=323622&view=diff
==============================================================================
--- lld/trunk/wasm/Symbols.h (original)
+++ lld/trunk/wasm/Symbols.h Sun Jan 28 11:57:02 2018
@@ -92,8 +92,7 @@ public:
void setVirtualAddress(uint32_t VA);
void update(Kind K, InputFile *F = nullptr, uint32_t Flags = 0,
- InputChunk *chunk = nullptr,
- uint32_t Address = UINT32_MAX);
+ InputChunk *chunk = nullptr, uint32_t Address = UINT32_MAX);
void setArchiveSymbol(const Archive::Symbol &Sym) { ArchiveSymbol = Sym; }
const Archive::Symbol &getArchiveSymbol() { return ArchiveSymbol; }
More information about the llvm-commits
mailing list