From 6d8f20c2196f40c21ba93dc0285be1e196bad17c Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 27 Feb 2017 22:41:39 +0000 Subject: [PATCH] [WebAssembly] Add some comments and tidy up whitespace. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296402 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/WasmObjectWriter.cpp | 5 +++-- .../WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp | 2 +- lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp | 2 +- lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.h | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/MC/WasmObjectWriter.cpp b/lib/MC/WasmObjectWriter.cpp index 9c0a593592c..e61b1254735 100644 --- a/lib/MC/WasmObjectWriter.cpp +++ b/lib/MC/WasmObjectWriter.cpp @@ -283,7 +283,8 @@ void WasmObjectWriter::recordRelocation(MCAssembler &Asm, namespace { -// +// The signature of a wasm function, in a struct capable of being used as a +// DenseMap key. struct WasmFunctionType { // Support empty and tombstone instances, needed by DenseMap. enum { Plain, Empty, Tombstone } State; @@ -356,7 +357,7 @@ struct WasmGlobal { uint32_t InitialValue; }; -} // end anonymous namespace +} // end anonymous namespace // Write X as an (unsigned) LEB value at offset Offset in Stream, padded // to allow patching. diff --git a/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp b/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp index 5b210742063..16d5e51770f 100644 --- a/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp +++ b/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp @@ -18,12 +18,12 @@ #include "llvm/MC/MCAssembler.h" #include "llvm/MC/MCDirectives.h" #include "llvm/MC/MCELFObjectWriter.h" -#include "llvm/MC/MCWasmObjectWriter.h" #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCFixupKindInfo.h" #include "llvm/MC/MCObjectWriter.h" #include "llvm/MC/MCSubtargetInfo.h" #include "llvm/MC/MCSymbol.h" +#include "llvm/MC/MCWasmObjectWriter.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; diff --git a/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp b/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp index cdbd9ea4b09..76a2ff3f980 100644 --- a/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp +++ b/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp @@ -84,7 +84,7 @@ static void FindUses(Value *V, Function &F, // - Call with fewer arguments than needed: arguments are filled in with undef // - Return value is not needed: drop it // - Return value needed but not present: supply an undef -// +// // For now, return nullptr without creating a wrapper if the wrapper cannot // be generated due to incompatible types. static Function *CreateWrapper(Function *F, FunctionType *Ty) { diff --git a/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.h b/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.h index 98b21803da2..690ca86a8df 100644 --- a/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.h +++ b/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.h @@ -15,9 +15,9 @@ #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_RUNTIME_LIBCALL_SIGNATURES_H #define LLVM_LIB_TARGET_WEBASSEMBLY_RUNTIME_LIBCALL_SIGNATURES_H +#include "MCTargetDesc/WebAssemblyMCTargetDesc.h" #include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/RuntimeLibcalls.h" -#include "MCTargetDesc/WebAssemblyMCTargetDesc.h" namespace llvm { -- 2.50.1