Implement NonSemantic.Shader.DebugInfo.100
[platform/upstream/glslang.git] / SPIRV / spvIR.h
index ddccd26..0969127 100644 (file)
@@ -349,6 +349,7 @@ public:
     const std::vector<Block*>& getBlocks() const { return blocks; }
     void addLocalVariable(std::unique_ptr<Instruction> inst);
     Id getReturnType() const { return functionInstruction.getTypeId(); }
+    Id getFuncId() const { return functionInstruction.getResultId(); }
     void setReturnPrecision(Decoration precision)
     {
         if (precision == DecorationRelaxedPrecision)
@@ -358,7 +359,7 @@ public:
         { return reducedPrecisionReturn ? DecorationRelaxedPrecision : NoPrecision; }
 
     void setDebugLineInfo(Id fileName, int line, int column) {
-        lineInstruction = std::make_unique<Instruction>(OpLine);
+        lineInstruction = std::unique_ptr<Instruction>{new Instruction(OpLine)};
         lineInstruction->addIdOperand(fileName);
         lineInstruction->addImmediateOperand(line);
         lineInstruction->addImmediateOperand(column);