1
0
Fork 0
mirror of https://git.suyu.dev/suyu/sirit.git synced 2025-01-26 20:23:48 +00:00
sirit/src/insts/debug.cpp

21 lines
522 B
C++
Raw Normal View History

2018-08-31 08:40:15 +01:00
/* This file is part of the sirit project.
* Copyright (c) 2018 ReinUsesLisp
* This software may be used and distributed according to the terms of the GNU
* Lesser General Public License version 2.1 or any later version.
*/
#include "sirit/sirit.h"
#include "insts.h"
namespace Sirit {
2018-08-31 08:55:01 +01:00
Ref Module::Name(Ref target, const std::string& name) {
2018-10-03 04:32:45 +01:00
auto const op{new Op(spv::Op::OpName)};
2018-08-31 08:40:15 +01:00
op->Add(target);
op->Add(name);
debug.push_back(std::unique_ptr<Op>(op));
2018-08-31 08:55:01 +01:00
return target;
2018-08-31 08:40:15 +01:00
}
} // namespace Sirit