Skip to content

Commit 828d2ab

Browse files
svenvhPavel V Chupin
authored and
Pavel V Chupin
committed
Fix some typos
Original commit: KhronosGroup/SPIRV-LLVM-Translator@24c5671
1 parent 012d497 commit 828d2ab

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

llvm-spirv/lib/SPIRV/SPIRVLowerOCLBlocks.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
//===----------------------------------------------------------------------===//
3434
//
3535
// SPIR-V specification doesn't allow function pointers, so SPIR-V translator
36-
// is designed to fail if a value with function type (except calls) is occured.
36+
// is designed to fail if a value with function type (except calls) occurs.
3737
// Currently there is only two cases, when function pointers are generating in
3838
// LLVM IR in OpenCL - block calls and device side enqueue built-in calls.
3939
//
@@ -44,9 +44,9 @@
4444
// structure:
4545
// %struct.__opencl_block_literal_generic = type { i32, i32, i8 addrspace(4)* }
4646
// Pointers to block invoke functions are stored in the third field. Clang
47-
// replaces inderect function calls in all cases except if block is passed as a
47+
// replaces indirect function calls in all cases except if block is passed as a
4848
// function argument. Note that it is somewhat unclear if the OpenCL C spec
49-
// should allow passing blocks as function argumernts. This pass is not supposed
49+
// should allow passing blocks as function arguments. This pass is not supposed
5050
// to work correctly with such functions.
5151
// Clang though has to store function pointers to this structure. Purpose of
5252
// this pass is to replace store of function pointers(not allowed in SPIR-V)
@@ -124,10 +124,9 @@ char SPIRVLowerOCLBlocksLegacy::ID = 0;
124124

125125
} // namespace
126126

127-
INITIALIZE_PASS(
128-
SPIRVLowerOCLBlocksLegacy, "spv-lower-ocl-blocks",
129-
"Remove function pointers occured in case of using OpenCL blocks", false,
130-
false)
127+
INITIALIZE_PASS(SPIRVLowerOCLBlocksLegacy, "spv-lower-ocl-blocks",
128+
"Remove function pointers originating from OpenCL blocks",
129+
false, false)
131130

132131
llvm::ModulePass *llvm::createSPIRVLowerOCLBlocksLegacy() {
133132
return new SPIRVLowerOCLBlocksLegacy();

0 commit comments

Comments
 (0)