Skip to content

Commit dec3154

Browse files
committed
[Docs] Fix incorrect return type for example code
1 parent 6680538 commit dec3154

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/docs/Vectorizers.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ that scatter/gathers memory.
267267

268268
.. code-block:: c++
269269

270-
int foo(int * A, int * B, int n) {
270+
void foo(int * A, int * B, int n) {
271271
for (intptr_t i = 0; i < n; ++i)
272272
A[i] += B[i * 4];
273273
}
@@ -284,7 +284,7 @@ vectorization is profitable.
284284

285285
.. code-block:: c++
286286

287-
int foo(int *A, char *B, int n) {
287+
void foo(int *A, char *B, int n) {
288288
for (int i = 0; i < n; ++i)
289289
A[i] += 4 * B[i];
290290
}
@@ -303,7 +303,7 @@ ignored (as other compilers do) are still being left un-vectorized.
303303

304304
struct { int A[100], K, B[100]; } Foo;
305305

306-
int foo() {
306+
void foo() {
307307
for (int i = 0; i < 100; ++i)
308308
Foo.A[i] = Foo.B[i] + 100;
309309
}

0 commit comments

Comments
 (0)