Skip to content

Commit 3def731

Browse files
committed
Space before units
1 parent 3c32aa1 commit 3def731

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

offload/tools/deviceinfo/llvm-offload-device-info.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ ol_result_t printPlatformValue(std::ostream &S, ol_platform_handle_t Plat,
129129
template <typename T, PrintKind PK = PrintKind::NORMAL>
130130
ol_result_t printDeviceValue(std::ostream &S, ol_device_handle_t Dev,
131131
ol_device_info_t Info, const char *Desc,
132-
const char *Units = "") {
132+
const char *Units = nullptr) {
133133
S << Desc << ": ";
134134

135135
if constexpr (std::is_pointer_v<T>) {
@@ -144,7 +144,9 @@ ol_result_t printDeviceValue(std::ostream &S, ol_device_handle_t Dev,
144144
OFFLOAD_ERR(olGetDeviceInfo(Dev, Info, sizeof(Val), &Val));
145145
doWrite<T, PK>(S, std::move(Val));
146146
}
147-
S << Units << "\n";
147+
if (Units)
148+
S << " " << Units;
149+
S << "\n";
148150
return OL_SUCCESS;
149151
}
150152

0 commit comments

Comments
 (0)