Skip to content

Commit 3ce9126

Browse files
premanandraosys-ce-bb
authored andcommitted
Reland #86923 with fixes
Fixes for sycl
1 parent f27e5de commit 3ce9126

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

clang/lib/CodeGen/CGBlocks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ llvm::Value *CodeGenFunction::EmitBlockLiteral(const CGBlockInfo &blockInfo) {
965965
} else if (type->getAs<ReferenceType>()) {
966966
Builder.CreateStore(src.emitRawPointer(*this), blockField);
967967

968-
// If type is const-qualified, copy the value into the block field.
968+
// If type is const-qualified, copy the value into the block field.
969969
} else if (type.isConstQualified() &&
970970
type.getObjCLifetime() == Qualifiers::OCL_Strong &&
971971
CGM.getCodeGenOpts().OptimizationLevel != 0) {

clang/lib/CodeGen/CGDecl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,7 +1721,7 @@ CodeGenFunction::EmitAutoVarAlloca(const VarDecl &D) {
17211721
SmallString<256> AnnotStr;
17221722
CGM.generateIntelFPGAAnnotation(&D, AnnotStr);
17231723
if (!AnnotStr.empty()) {
1724-
llvm::Value *V = address.getPointer();
1724+
llvm::Value *V = address.emitRawPointer(*this);
17251725
llvm::Type *DestPtrTy = llvm::PointerType::get(
17261726
CGM.getLLVMContext(), address.getAddressSpace());
17271727
llvm::Value *Arg = Builder.CreateBitCast(V, DestPtrTy, V->getName());
@@ -2639,7 +2639,7 @@ void CodeGenFunction::EmitParmDecl(const VarDecl &D, ParamValue Arg,
26392639
auto PtrTy = getContext().getPointerType(Ty);
26402640
AllocaPtr = CreateMemTemp(PtrTy, getContext().getTypeAlignInChars(PtrTy),
26412641
D.getName() + ".indirect_addr");
2642-
EmitStoreOfScalar(DeclPtr.getPointer(), AllocaPtr, /* Volatile */ false,
2642+
EmitStoreOfScalar(DeclPtr.emitRawPointer(*this), AllocaPtr, /* Volatile */ false,
26432643
PtrTy);
26442644
}
26452645

clang/lib/CodeGen/CGExpr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4093,7 +4093,7 @@ static Address emitArraySubscriptGEP(CodeGenFunction &CGF, Address addr,
40934093
addr = emitArraySubscriptGEP(CGF, addr, indices,
40944094
CGF.ConvertTypeForMem(eltType), inbounds,
40954095
signedIndices, loc, eltAlign, name);
4096-
AddIVDepMetadata(CGF, arrayDecl, eltPtr);
4096+
AddIVDepMetadata(CGF, arrayDecl, addr.emitRawPointer(CGF));
40974097
return addr;
40984098
} else {
40994099
// Remember the original array subscript for bpf target

clang/lib/CodeGen/CodeGenFunction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2922,7 +2922,7 @@ Address CodeGenFunction::EmitFieldSYCLAnnotations(const FieldDecl *D,
29222922
Address Addr) {
29232923
const auto *SYCLAnnotAttr = D->getAttr<SYCLAddIRAnnotationsMemberAttr>();
29242924
assert(SYCLAnnotAttr && "no add_ir_annotations_member attribute");
2925-
llvm::Value *V = Addr.getPointer();
2925+
llvm::Value *V = Addr.emitRawPointer(*this);
29262926
llvm::Type *VTy = V->getType();
29272927
auto *PTy = dyn_cast<llvm::PointerType>(VTy);
29282928
unsigned AS = PTy ? PTy->getAddressSpace() : 0;
@@ -2949,7 +2949,7 @@ Address CodeGenFunction::EmitIntelFPGAFieldAnnotations(const FieldDecl *D,
29492949
Address CodeGenFunction::EmitIntelFPGAFieldAnnotations(SourceLocation Location,
29502950
Address Addr,
29512951
StringRef AnnotStr) {
2952-
llvm::Value *V = Addr.getPointer();
2952+
llvm::Value *V = Addr.emitRawPointer(*this);
29532953
llvm::Type *VTy = V->getType();
29542954
// llvm.ptr.annotation intrinsic accepts a pointer to integer of any width -
29552955
// don't perform bitcasts if value is integer

0 commit comments

Comments
 (0)