Skip to content

Commit 2a193e0

Browse files
committed
reviewer feedback, comment changes
1 parent 8c7d1d5 commit 2a193e0

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,7 @@ class BinaryWrapper {
13031303

13041304
// Declaration for __sycl_unregister_lib(void*).
13051305
auto *UnregTargetTy =
1306-
FunctionType::get(Type::getVoidTy(C), getPtrTy(), false);
1306+
FunctionType::get(Type::getVoidTy(C), getPtrTy(), /*isVarArg=*/false);
13071307
FunctionCallee UnregTargetC =
13081308
M.getOrInsertFunction("__sycl_unregister_lib", UnregTargetTy);
13091309

@@ -1321,8 +1321,7 @@ class BinaryWrapper {
13211321
FunctionCallee RegTargetC =
13221322
M.getOrInsertFunction("__sycl_register_lib", RegTargetTy);
13231323

1324-
// `atexit` takes a `void(*)()` function pointer. In LLVM IR, this is
1325-
// typically represented as `i32 (ptr)`.
1324+
// `atexit` takes a `void(*)()` function pointer arg and returns an i32.
13261325
FunctionType *AtExitTy =
13271326
FunctionType::get(Type::getInt32Ty(C), getPtrTy(), false);
13281327
FunctionCallee AtExitC = M.getOrInsertFunction("atexit", AtExitTy);

llvm/lib/Frontend/Offloading/SYCLOffloadWrapper.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -765,8 +765,7 @@ struct Wrapper {
765765
FunctionCallee RegTargetC =
766766
M.getOrInsertFunction("__sycl_register_lib", RegTargetTy);
767767

768-
// `atexit` takes a `void(*)()` function pointer. In LLVM IR, this is
769-
// typically represented as `i32 (ptr)`.
768+
// `atexit` takes a `void(*)()` function pointer arg and returns an i32.
770769
FunctionType *AtExitTy = FunctionType::get(
771770
Type::getInt32Ty(C), PointerType::getUnqual(C), false);
772771
FunctionCallee AtExitC = M.getOrInsertFunction("atexit", AtExitTy);

0 commit comments

Comments
 (0)