[llvm] r296402 - [WebAssembly] Add some comments and tidy up whitespace.

Dan Gohman via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 27 14:41:39 PST 2017


Author: djg
Date: Mon Feb 27 16:41:39 2017
New Revision: 296402

URL: http://llvm.org/viewvc/llvm-project?rev=296402&view=rev
Log:
[WebAssembly] Add some comments and tidy up whitespace.

Modified:
    llvm/trunk/lib/MC/WasmObjectWriter.cpp
    llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp
    llvm/trunk/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp
    llvm/trunk/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.h

Modified: llvm/trunk/lib/MC/WasmObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/WasmObjectWriter.cpp?rev=296402&r1=296401&r2=296402&view=diff
==============================================================================
--- llvm/trunk/lib/MC/WasmObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/WasmObjectWriter.cpp Mon Feb 27 16:41:39 2017
@@ -283,7 +283,8 @@ void WasmObjectWriter::recordRelocation(
 
 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.

Modified: llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp?rev=296402&r1=296401&r2=296402&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp Mon Feb 27 16:41:39 2017
@@ -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;

Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp?rev=296402&r1=296401&r2=296402&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp Mon Feb 27 16:41:39 2017
@@ -84,7 +84,7 @@ static void FindUses(Value *V, Function
 //  - 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) {

Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.h?rev=296402&r1=296401&r2=296402&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.h (original)
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.h Mon Feb 27 16:41:39 2017
@@ -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 {
 




More information about the llvm-commits mailing list