Talvos  0.1
SPIR-V interpreter and dynamic analysis framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Block.cpp
Go to the documentation of this file.
1 // Copyright (c) 2018 the Talvos developers. All rights reserved.
2 //
3 // This file is distributed under a three-clause BSD license. For full license
4 // terms please see the LICENSE file distributed with this source code.
5 
8 
9 #include "talvos/Block.h"
10 #include "talvos/Instruction.h"
11 
12 #include <spirv/unified1/spirv.h>
13 
14 namespace talvos
15 {
16 
17 Block::Block(uint32_t Id)
18 {
19  this->Id = Id;
20  Label = std::make_unique<Instruction>(SpvOpLabel, 1, &Id, nullptr);
21 }
22 
24 
25 } // namespace talvos
This file declares the Block class.
This file declares the Instruction class.
std::unique_ptr< Instruction > Label
The label instruction.
Definition: Block.h:44
Block(uint32_t Id)
Create a new block with an ID.
Definition: Block.cpp:17
uint32_t Id
The unique ID of the block.
Definition: Block.h:42