File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
clang/tools/clang-offload-wrapper
llvm/lib/Frontend/Offloading Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff 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);
Original file line number Diff line number Diff 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);
You can’t perform that action at this time.
0 commit comments