[WebAssembly] Add some comments and tidy up whitespace.

llvm-svn: 296402
This commit is contained in:
Dan Gohman 2017-02-27 22:41:39 +00:00
parent 10268f93e8
commit d37dc2f773
4 changed files with 6 additions and 5 deletions

View File

@ -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.

View File

@ -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;

View File

@ -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) {

View File

@ -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 {