[WebAssembly] clang-format (NFC)
Summary: This patch runs clang-format on all wasm-only files.
Reviewers: aardappel, dschuff, sunfish, tlively
Subscribers: MatzeB, sbc100, jgravelle-google, llvm-commits
Differential Revision: https://reviews.llvm.org/D51447
llvm-svn: 341439
diff --git a/llvm/tools/obj2yaml/wasm2yaml.cpp b/llvm/tools/obj2yaml/wasm2yaml.cpp
index dbaf1a2..ad91aca 100644
--- a/llvm/tools/obj2yaml/wasm2yaml.cpp
+++ b/llvm/tools/obj2yaml/wasm2yaml.cpp
@@ -49,11 +49,13 @@
return L;
}
-std::unique_ptr<WasmYAML::CustomSection> WasmDumper::dumpCustomSection(const WasmSection &WasmSec) {
+std::unique_ptr<WasmYAML::CustomSection>
+WasmDumper::dumpCustomSection(const WasmSection &WasmSec) {
std::unique_ptr<WasmYAML::CustomSection> CustomSec;
if (WasmSec.Name == "name") {
- std::unique_ptr<WasmYAML::NameSection> NameSec = make_unique<WasmYAML::NameSection>();
- for (const llvm::wasm::WasmFunctionName &Func: Obj.debugNames()) {
+ std::unique_ptr<WasmYAML::NameSection> NameSec =
+ make_unique<WasmYAML::NameSection>();
+ for (const llvm::wasm::WasmFunctionName &Func : Obj.debugNames()) {
WasmYAML::NameEntry NameEntry;
NameEntry.Name = Func.Name;
NameEntry.Index = Func.Index;
@@ -61,7 +63,8 @@
}
CustomSec = std::move(NameSec);
} else if (WasmSec.Name == "linking") {
- std::unique_ptr<WasmYAML::LinkingSection> LinkingSec = make_unique<WasmYAML::LinkingSection>();
+ std::unique_ptr<WasmYAML::LinkingSection> LinkingSec =
+ make_unique<WasmYAML::LinkingSection>();
LinkingSec->Version = Obj.linkingData().Version;
ArrayRef<StringRef> Comdats = Obj.linkingData().Comdats;
@@ -70,7 +73,7 @@
for (auto &Func : Obj.functions()) {
if (Func.Comdat != UINT32_MAX) {
LinkingSec->Comdats[Func.Comdat].Entries.emplace_back(
- WasmYAML::ComdatEntry{wasm::WASM_COMDAT_FUNCTION, Func.Index});
+ WasmYAML::ComdatEntry{wasm::WASM_COMDAT_FUNCTION, Func.Index});
}
}
@@ -290,7 +293,7 @@
llvm_unreachable("Unknown section type");
break;
}
- for (const wasm::WasmRelocation &Reloc: WasmSec.Relocations) {
+ for (const wasm::WasmRelocation &Reloc : WasmSec.Relocations) {
WasmYAML::Relocation R;
R.Type = Reloc.Type;
R.Index = Reloc.Index;