summaryrefslogtreecommitdiffhomepage
path: root/asm/assembler.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-11-15 13:55:18 +0100
committerRoland Reichwein <mail@reichwein.it>2020-11-15 13:55:18 +0100
commitd07c5bc14edbe071ee7b4f47f174780e95e451aa (patch)
tree889ed88ea6907119b75b7b76f616a604c9857e3d /asm/assembler.h
parent9e7f4c9d43b310c280cd6432cd4150411f4b914e (diff)
Simplify Asm construction
Diffstat (limited to 'asm/assembler.h')
-rw-r--r--asm/assembler.h6
1 files changed, 3 insertions, 3 deletions
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<std::shared_ptr<Op>(Asm::Args&)>;
+using FactoryFunction = std::function<std::shared_ptr<Op>(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<Op> makeOp(const std::string& mnemonic, Asm::Args& args);
+std::shared_ptr<Op> makeOp(const std::string& mnemonic, const Asm::Args& args);
// overload for empty list of arguments
std::shared_ptr<Op> makeOp(const std::string& mnemonic);
@@ -137,5 +137,5 @@ std::string mangleName(const std::string& s)
return mangleName<Targs...>(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);