From d07c5bc14edbe071ee7b4f47f174780e95e451aa Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 15 Nov 2020 13:55:18 +0100 Subject: Simplify Asm construction --- asm/assembler.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'asm/assembler.h') diff --git a/asm/assembler.h b/asm/assembler.h index b459b85..aa886b5 100644 --- a/asm/assembler.h +++ b/asm/assembler.h @@ -107,14 +107,14 @@ public: } // namespace Asm -using FactoryFunction = std::function(Asm::Args&)>; +using FactoryFunction = std::function(const Asm::Args&)>; // mnemonic: mnemonic including argument types bool registerOp(const std::string& mnemonic, FactoryFunction f); // Create Op from a registered mnemonic // mnemonic: just the mnemonic name -std::shared_ptr makeOp(const std::string& mnemonic, Asm::Args& args); +std::shared_ptr makeOp(const std::string& mnemonic, const Asm::Args& args); // overload for empty list of arguments std::shared_ptr makeOp(const std::string& mnemonic); @@ -137,5 +137,5 @@ std::string mangleName(const std::string& s) return mangleName(s + "_" + typeid(T).name()); } -std::string mangleName(const std::string& s, Asm::Args& args); +std::string mangleName(const std::string& s, const Asm::Args& args); -- cgit v1.2.3