Skip to content

Commit d4647f6

Browse files
committed
Change comments
1 parent 0709448 commit d4647f6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2437,9 +2437,9 @@ static void emitUsed(CodeGenModule &CGM, StringRef Name,
24372437
// Don't create llvm.used if there is no need.
24382438
if (List.empty())
24392439
return;
2440-
// Get target type when templated global variables are used,
2441-
// to emit them correctly in the target (default) address space and avoid
2442-
// emitting them in a private address space.
2440+
// For SYCL emit pointers in the default address space which is a superset of
2441+
// other address spaces, so that casts from any other address spaces will be
2442+
// valid.
24432443
llvm::PointerType *TargetType = CGM.Int8PtrTy;
24442444
if (CGM.getLangOpts().SYCLIsDevice)
24452445
TargetType = llvm::IntegerType::getInt8PtrTy(
@@ -2862,9 +2862,9 @@ void CodeGenModule::AddGlobalAnnotations(const ValueDecl *D,
28622862
Annotations.push_back(EmitAnnotateAttr(GV, I, D->getLocation()));
28632863
}
28642864

2865-
// Add "sycl-unique-id" llvm IR attribute for global variables marked with
2866-
// SYCL device_global attribute, and return a unique string using
2867-
// __builtin_sycl_unique_stable_id.
2865+
// Add "sycl-unique-id" llvm IR attribute that has a unique string generated
2866+
// by __builtin_sycl_unique_stable_id for global variables marked with
2867+
// SYCL device_global attribute.
28682868
static void addSYCLUniqueID(llvm::GlobalVariable *GV, const VarDecl *VD,
28692869
ASTContext &Context) {
28702870
auto builtinString = SYCLUniqueStableIdExpr::ComputeName(Context, VD);

0 commit comments

Comments
 (0)