mirror of
https://github.com/yuzu-emu/sirit.git
synced 2024-12-22 19:05:31 +00:00
Add OpString
This commit is contained in:
parent
d4c95981b5
commit
96e8290eef
|
@ -200,6 +200,9 @@ class Module {
|
|||
/// @return target
|
||||
Id Name(Id target, const std::string& name);
|
||||
|
||||
/// Assign a Result <id> to a string for use by other debug instructions.
|
||||
Id OpString(const std::string& string);
|
||||
|
||||
// Memory
|
||||
|
||||
/// Allocate an object in memory, resulting in a copy to it.
|
||||
|
|
|
@ -19,4 +19,10 @@ Id Module::Name(Id target, const std::string& name) {
|
|||
return target;
|
||||
}
|
||||
|
||||
Id Module::OpString(const std::string& string) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpString, bound++)};
|
||||
op->Add(string);
|
||||
return AddCode(std::move(op));
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
|
Loading…
Reference in a new issue