Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ class BinaryWrapper {
std::pair<Constant *, Constant *>
addStructArrayToModule(ArrayRef<Constant *> ArrayData, Type *ElemTy) {

auto *PtrTy = ElemTy->getPointerTo();
auto *PtrTy = llvm::PointerType::getUnqual(C);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can any part of this go upstream? or is it all sycl specific?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I know, ClangOffloadWrapper.cpp is not present upstream, is it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh sorry i thought it was LinkerWrapper, my bad


if (ArrayData.size() == 0) {
auto *NullPtr = Constant::getNullValue(PtrTy);
Expand Down Expand Up @@ -917,8 +917,7 @@ class BinaryWrapper {
PropRegistry = MySymPropReader->getPropRegistry();
} else {
if (PropRegistryFile.empty()) {
auto *NullPtr =
Constant::getNullValue(getSyclPropSetTy()->getPointerTo());
auto *NullPtr = Constant::getNullValue(llvm::PointerType::getUnqual(C));
return std::pair<Constant *, Constant *>(NullPtr, NullPtr);
}
// load the property registry file
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Frontend/Offloading/SYCLOffloadWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ struct Wrapper {
std::pair<Constant *, Constant *>
addStructArrayToModule(ArrayRef<Constant *> ArrayData, Type *ElemTy) {
if (ArrayData.empty()) {
auto *PtrTy = ElemTy->getPointerTo();
auto *PtrTy = llvm::PointerType::getUnqual(ElemTy->getContext());
auto *NullPtr = Constant::getNullValue(PtrTy);
return std::make_pair(NullPtr, NullPtr);
}
Expand Down
Loading