From e51c058ecc2d06b329e176a78487144828a7ae51 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 6 Oct 2015 00:27:55 +0000 Subject: [WebAssembly] Switch to a more traditional assembly syntax This new syntax is built around putting each instruction on its own line in a "mnemonic op, op, op" like syntax. It also uses conventional data section directives like ".byte" and so on rather than requiring everything to be in hierarchical S-expression format. This is a more natural syntax for a ".s" file format from the perspective of LLVM MC and related tools, while remaining easy to translate into other forms as needed. llvm-svn: 249364 --- llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h') diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h b/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h index 22ef48116af..a571e63d7f6 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h +++ b/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h @@ -27,9 +27,15 @@ namespace llvm { class WebAssemblyFunctionInfo final : public MachineFunctionInfo { MachineFunction &MF; + unsigned NumArguments; + public: - explicit WebAssemblyFunctionInfo(MachineFunction &MF) : MF(MF) {} + explicit WebAssemblyFunctionInfo(MachineFunction &MF) + : MF(MF), NumArguments(0) {} ~WebAssemblyFunctionInfo() override; + + void setNumArguments(unsigned N) { NumArguments = N; } + unsigned getNumArguments() const { return NumArguments; } }; } // end namespace llvm -- cgit v1.2.3