Skip to content

Commit 4197187

Browse files
Apply suggestions from code review
1 parent 7c5b050 commit 4197187

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/lib/Object/SYCLBIN.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ SYCLBIN::createIRModuleHeader(const SYCLBIN::ModuleDesc &Desc,
8080
raw_svector_ostream &MetadataByteTableOS,
8181
SmallString<0> &BinaryByteTable,
8282
raw_svector_ostream &BinaryByteTableOS) {
83-
// If no arch string is present, the module must be IR.
83+
// If there is an arch string, the module must be a native device code image.
84+
// Return with no IR module in this case.
8485
if (!Desc.ArchString.empty())
8586
return std::nullopt;
8687

@@ -116,8 +117,8 @@ SYCLBIN::createNativeDeviceCodeImageHeader(
116117
const SYCLBIN::ModuleDesc &Desc, const module_split::SplitModule &SM,
117118
SmallString<0> &MetadataByteTable, raw_svector_ostream &MetadataByteTableOS,
118119
SmallString<0> &BinaryByteTable, raw_svector_ostream &BinaryByteTableOS) {
119-
// If arch string is present, the module must be a native device code
120-
// image.
120+
// If there is no arch string, the module must be an IR module.
121+
// Return with no native device code image in this case.
121122
if (Desc.ArchString.empty())
122123
return std::nullopt;
123124

0 commit comments

Comments
 (0)