diff options
author | Heejin Ahn <aheejin@gmail.com> | 2018-09-05 01:27:38 +0000 |
---|---|---|
committer | Heejin Ahn <aheejin@gmail.com> | 2018-09-05 01:27:38 +0000 |
commit | f208f6311b6ea3468b35deab208e307f8a59781b (patch) | |
tree | 24a733e46980c1385f08e5c6892bdfd85341cd1d /llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp | |
parent | 5d05be84b7cdcb9160d49167ec78d4555a18f405 (diff) | |
download | bcm5719-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/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp index c8e7fe4caef..e62b8b60d0d 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp @@ -97,8 +97,8 @@ public: char WebAssemblyCFGStackify::ID = 0; INITIALIZE_PASS(WebAssemblyCFGStackify, DEBUG_TYPE, - "Insert BLOCK and LOOP markers for WebAssembly scopes", - false, false) + "Insert BLOCK and LOOP markers for WebAssembly scopes", false, + false) FunctionPass *llvm::createWebAssemblyCFGStackify() { return new WebAssemblyCFGStackify(); @@ -633,10 +633,18 @@ void WebAssemblyCFGStackify::fixEndsAtEndOfFunction(MachineFunction &MF) { WebAssembly::ExprType retType; switch (MFI.getResults().front().SimpleTy) { - case MVT::i32: retType = WebAssembly::ExprType::I32; break; - case MVT::i64: retType = WebAssembly::ExprType::I64; break; - case MVT::f32: retType = WebAssembly::ExprType::F32; break; - case MVT::f64: retType = WebAssembly::ExprType::F64; break; + case MVT::i32: + retType = WebAssembly::ExprType::I32; + break; + case MVT::i64: + retType = WebAssembly::ExprType::I64; + break; + case MVT::f32: + retType = WebAssembly::ExprType::F32; + break; + case MVT::f64: + retType = WebAssembly::ExprType::F64; + break; case MVT::v16i8: case MVT::v8i16: case MVT::v4i32: @@ -645,8 +653,11 @@ void WebAssemblyCFGStackify::fixEndsAtEndOfFunction(MachineFunction &MF) { case MVT::v2f64: retType = WebAssembly::ExprType::V128; break; - case MVT::ExceptRef: retType = WebAssembly::ExprType::ExceptRef; break; - default: llvm_unreachable("unexpected return type"); + case MVT::ExceptRef: + retType = WebAssembly::ExprType::ExceptRef; + break; + default: + llvm_unreachable("unexpected return type"); } for (MachineBasicBlock &MBB : reverse(MF)) { @@ -669,9 +680,8 @@ void WebAssemblyCFGStackify::fixEndsAtEndOfFunction(MachineFunction &MF) { // WebAssembly functions end with an end instruction, as if the function body // were a block. -static void AppendEndToFunction( - MachineFunction &MF, - const WebAssemblyInstrInfo &TII) { +static void AppendEndToFunction(MachineFunction &MF, + const WebAssemblyInstrInfo &TII) { BuildMI(MF.back(), MF.back().end(), MF.back().findPrevDebugLoc(MF.back().end()), TII.get(WebAssembly::END_FUNCTION)); |