mirror of
https://github.com/yuzu-emu/sirit.git
synced 2024-11-22 11:55:37 +01:00
Add OpUndef
This commit is contained in:
parent
01c658b891
commit
93c17d11f9
@ -219,6 +219,11 @@ class Module {
|
||||
spv::Decoration decoration,
|
||||
const std::vector<Literal>& literals = {});
|
||||
|
||||
// Misc
|
||||
|
||||
/// Make an intermediate object whose value is undefined.
|
||||
Ref Undef(Ref result_type);
|
||||
|
||||
private:
|
||||
Ref AddCode(Op* op);
|
||||
|
||||
|
@ -20,6 +20,7 @@ add_library(sirit
|
||||
insts/debug.cpp
|
||||
insts/memory.cpp
|
||||
insts/annotation.cpp
|
||||
insts/misc.cpp
|
||||
)
|
||||
target_include_directories(sirit
|
||||
PUBLIC ../include
|
||||
|
17
src/insts/misc.cpp
Normal file
17
src/insts/misc.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
/* 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 "insts.h"
|
||||
#include "sirit/sirit.h"
|
||||
#include <cassert>
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Ref Module::Undef(Ref result_type) {
|
||||
return AddCode(new Op(spv::Op::OpUndef, bound++, result_type));
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
Loading…
Reference in New Issue
Block a user