summaryrefslogtreecommitdiffstats
path: root/llvm/tools/obj2yaml
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2018-09-05 01:27:38 +0000
committerHeejin Ahn <aheejin@gmail.com>2018-09-05 01:27:38 +0000
commitf208f6311b6ea3468b35deab208e307f8a59781b (patch)
tree24a733e46980c1385f08e5c6892bdfd85341cd1d /llvm/tools/obj2yaml
parent5d05be84b7cdcb9160d49167ec78d4555a18f405 (diff)
downloadbcm5719-llvm-f208f6311b6ea3468b35deab208e307f8a59781b.tar.gz
bcm5719-llvm-f208f6311b6ea3468b35deab208e307f8a59781b.zip
[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
Diffstat (limited to 'llvm/tools/obj2yaml')
-rw-r--r--llvm/tools/obj2yaml/wasm2yaml.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/llvm/tools/obj2yaml/wasm2yaml.cpp b/llvm/tools/obj2yaml/wasm2yaml.cpp
index dbaf1a2848f..ad91acaeb26 100644
--- a/llvm/tools/obj2yaml/wasm2yaml.cpp
+++ b/llvm/tools/obj2yaml/wasm2yaml.cpp
@@ -49,11 +49,13 @@ static WasmYAML::Limits make_limits(const wasm::WasmLimits &Limits) {
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 @@ std::unique_ptr<WasmYAML::CustomSection> WasmDumper::dumpCustomSection(const Was
}
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 @@ std::unique_ptr<WasmYAML::CustomSection> WasmDumper::dumpCustomSection(const Was
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 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
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;
OpenPOWER on IntegriCloud