summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2015-10-06 00:27:55 +0000
committerDan Gohman <dan433584@gmail.com>2015-10-06 00:27:55 +0000
commite51c058ecc2d06b329e176a78487144828a7ae51 (patch)
treeccbaecac243b7f16d7683c0bdc128ad892e7810f /llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
parentd77e802f0772e3f0fe53027a9e09de3dae46b911 (diff)
downloadbcm5719-llvm-e51c058ecc2d06b329e176a78487144828a7ae51.tar.gz
bcm5719-llvm-e51c058ecc2d06b329e176a78487144828a7ae51.zip
[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
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h8
1 files changed, 7 insertions, 1 deletions
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
OpenPOWER on IntegriCloud