mirror of
https://github.com/yuzu-emu/sirit.git
synced 2024-11-25 18:05:40 +01:00
Debug fixups
This commit is contained in:
parent
96e8290eef
commit
65ccda50c7
@ -201,7 +201,10 @@ class Module {
|
||||
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);
|
||||
Id String(const std::string& string);
|
||||
|
||||
/// Add source-level location information
|
||||
Id OpLine(Id file, Literal line, Literal column);
|
||||
|
||||
// Memory
|
||||
|
||||
|
@ -19,9 +19,19 @@ Id Module::Name(Id target, const std::string& name) {
|
||||
return target;
|
||||
}
|
||||
|
||||
Id Module::OpString(const std::string& string) {
|
||||
Id Module::String(const std::string& string) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpString, bound++)};
|
||||
op->Add(string);
|
||||
const auto id = op.get();
|
||||
debug.push_back(std::move(op));
|
||||
return id;
|
||||
}
|
||||
|
||||
Id Module::OpLine(Id file, Literal line, Literal column) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpLine)};
|
||||
op->Add(file);
|
||||
op->Add(line);
|
||||
op->Add(column);
|
||||
return AddCode(std::move(op));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user