diff --git a/tools/clang/include/clang/SPIRV/SpirvBuilder.h b/tools/clang/include/clang/SPIRV/SpirvBuilder.h index 2f33dcd9d..e6898a1dc 100644 --- a/tools/clang/include/clang/SPIRV/SpirvBuilder.h +++ b/tools/clang/include/clang/SPIRV/SpirvBuilder.h @@ -411,7 +411,7 @@ public: void createEmitVertex(SourceLocation loc = {}); /// \brief Creates an OpEndPrimitive instruction. - void createEndPrimitive(SourceLocation loc = {}); + void createEndPrimitive(SourceLocation); /// \brief Creates an OpArrayLength instruction. SpirvArrayLength *createArrayLength(QualType resultType, SourceLocation loc, diff --git a/tools/clang/lib/SPIRV/SpirvEmitter.cpp b/tools/clang/lib/SPIRV/SpirvEmitter.cpp index edcf39574..4830855c1 100644 --- a/tools/clang/lib/SPIRV/SpirvEmitter.cpp +++ b/tools/clang/lib/SPIRV/SpirvEmitter.cpp @@ -3516,7 +3516,7 @@ SpirvEmitter::processStreamOutputAppend(const CXXMemberCallExpr *expr) { SpirvInstruction * SpirvEmitter::processStreamOutputRestart(const CXXMemberCallExpr *expr) { // TODO: handle multiple stream-output objects - spvBuilder.createEndPrimitive(); + spvBuilder.createEndPrimitive(expr->getExprLoc()); return 0; }