OSDN Git Service

[WebAssembly] Add some comments and tidy up whitespace.
authorDan Gohman <dan433584@gmail.com>
Mon, 27 Feb 2017 22:41:39 +0000 (22:41 +0000)
committerDan Gohman <dan433584@gmail.com>
Mon, 27 Feb 2017 22:41:39 +0000 (22:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296402 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/WasmObjectWriter.cpp
lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp
lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp
lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.h

index 9c0a593..e61b125 100644 (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.
index 5b21074..16d5e51 100644 (file)
 #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;
index cdbd9ea..76a2ff3 100644 (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) {
index 98b2180..690ca86 100644 (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 {