MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / SetInlinedOperand

Function SetInlinedOperand

source/opt/debug_info_manager.cpp:51–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49constexpr uint32_t kDebugLocalVariableOperandFlagsIndex = 10;
50
51void SetInlinedOperand(Instruction* dbg_inlined_at, uint32_t inlined_operand) {
52 assert(dbg_inlined_at);
53 assert(dbg_inlined_at->GetCommonDebugOpcode() ==
54 CommonDebugInfoDebugInlinedAt);
55 if (dbg_inlined_at->NumOperands() <= kDebugInlinedAtOperandInlinedIndex) {
56 dbg_inlined_at->AddOperand(
57 {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {inlined_operand}});
58 } else {
59 dbg_inlined_at->SetOperand(kDebugInlinedAtOperandInlinedIndex,
60 {inlined_operand});
61 }
62}
63
64uint32_t GetInlinedOperand(Instruction* dbg_inlined_at) {
65 assert(dbg_inlined_at);

Callers 1

Calls 4

GetCommonDebugOpcodeMethod · 0.80
NumOperandsMethod · 0.80
AddOperandMethod · 0.80
SetOperandMethod · 0.80

Tested by

no test coverage detected