Skip to content

Commit 4bf9e1e

Browse files
RossBruntonronlieb
authored andcommitted
[Offload] Print Image location rather than casting it (llvm#160309)
This squishes a warning where the runtime tries to bind a StringRef to a `%p`.
1 parent e51fc09 commit 4bf9e1e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

offload/plugins-nextgen/common/src/PluginInterface.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1984,7 +1984,8 @@ int32_t GenericPluginTy::supports_empty_images() {
19841984
int32_t GenericPluginTy::isPluginCompatible(StringRef Image) {
19851985
auto HandleError = [&](Error Err) -> bool {
19861986
[[maybe_unused]] std::string ErrStr = toString(std::move(Err));
1987-
DP("Failure to check validity of image %p: %s", Image, ErrStr.c_str());
1987+
DP("Failure to check validity of image %p: %s", Image.data(),
1988+
ErrStr.c_str());
19881989
return false;
19891990
};
19901991
switch (identify_magic(Image)) {
@@ -2012,7 +2013,8 @@ int32_t GenericPluginTy::isPluginCompatible(StringRef Image) {
20122013
int32_t GenericPluginTy::isDeviceCompatible(int32_t DeviceId, StringRef Image) {
20132014
auto HandleError = [&](Error Err) -> bool {
20142015
[[maybe_unused]] std::string ErrStr = toString(std::move(Err));
2015-
DP("Failure to check validity of image %p: %s", Image, ErrStr.c_str());
2016+
DP("Failure to check validity of image %p: %s", Image.data(),
2017+
ErrStr.c_str());
20162018
return false;
20172019
};
20182020
switch (identify_magic(Image)) {

0 commit comments

Comments
 (0)