Tweak CMake MSVC flags to silence spurious warnings. (#5033)
diff --git a/iree/testing/vulkan/iree-run-module-vulkan-gui-main.cc b/iree/testing/vulkan/iree-run-module-vulkan-gui-main.cc
index ba1eb58..0ea4501 100644
--- a/iree/testing/vulkan/iree-run-module-vulkan-gui-main.cc
+++ b/iree/testing/vulkan/iree-run-module-vulkan-gui-main.cc
@@ -115,12 +115,10 @@
IREE_LOG(INFO) << "EXEC @" << function_name;
IREE_RETURN_IF_ERROR(iree_vm_invoke(context, function, /*policy=*/nullptr,
function_inputs.get(), outputs.get(),
- iree_allocator_system()))
- << "invoking function " << function_name;
+ iree_allocator_system()));
std::ostringstream oss;
- IREE_RETURN_IF_ERROR(PrintVariantList(output_descs, outputs.get(), &oss))
- << "printing results";
+ IREE_RETURN_IF_ERROR(PrintVariantList(output_descs, outputs.get(), &oss));
outputs.reset();
@@ -306,10 +304,7 @@
// Load bytecode module from embedded data.
IREE_LOG(INFO) << "Loading IREE byecode module...";
std::string module_file;
- Status status = iree::GetModuleContentsFromFlags(&module_file);
- if (!status.ok()) {
- IREE_LOG(FATAL) << "Error when reading module file" << status;
- }
+ IREE_CHECK_OK(iree::GetModuleContentsFromFlags(&module_file));
iree_vm_module_t* bytecode_module = nullptr;
IREE_CHECK_OK(iree_vm_bytecode_module_create(
iree_const_byte_span_t{
@@ -404,8 +399,7 @@
// Custom window.
auto status = RunModuleAndUpdateImGuiWindow(
iree_vk_device, iree_context, main_function, entry_function,
- main_function_inputs.value(), main_function_output_descs.value(),
- window_title);
+ main_function_inputs, main_function_output_descs, window_title);
if (!status.ok()) {
IREE_LOG(FATAL) << status;
done = true;
@@ -422,7 +416,7 @@
// --------------------------------------------------------------------------
// Cleanup
- main_function_inputs.value().reset();
+ iree_vm_ref_release(main_function_inputs);
iree_vm_module_release(hal_module);
iree_vm_module_release(bytecode_module);
diff --git a/iree/vm/ref_cc.h b/iree/vm/ref_cc.h
index 33000fe..e8299aa 100644
--- a/iree/vm/ref_cc.h
+++ b/iree/vm/ref_cc.h
@@ -239,29 +239,29 @@
typedef T* this_type::*unspecified_bool_type;
public:
- ABSL_ATTRIBUTE_ALWAYS_INLINE iree_vm_ref_type_t type() const noexcept {
+ IREE_ATTRIBUTE_ALWAYS_INLINE iree_vm_ref_type_t type() const noexcept {
return ref_type_descriptor<T>::get()->type;
}
- ABSL_ATTRIBUTE_ALWAYS_INLINE ref() noexcept
+ IREE_ATTRIBUTE_ALWAYS_INLINE ref() noexcept
: ref_({
0,
ref_type_descriptor<T>::get()->offsetof_counter,
ref_type_descriptor<T>::get()->type,
}) {}
- ABSL_ATTRIBUTE_ALWAYS_INLINE ref(std::nullptr_t) noexcept // NOLINT
+ IREE_ATTRIBUTE_ALWAYS_INLINE ref(std::nullptr_t) noexcept // NOLINT
: ref_({
0,
ref_type_descriptor<T>::get()->offsetof_counter,
ref_type_descriptor<T>::get()->type,
}) {}
- ABSL_ATTRIBUTE_ALWAYS_INLINE ref(T* p) noexcept // NOLINT
+ IREE_ATTRIBUTE_ALWAYS_INLINE ref(T* p) noexcept // NOLINT
: ref_({
p,
ref_type_descriptor<T>::get()->offsetof_counter,
ref_type_descriptor<T>::get()->type,
}) {}
- ABSL_ATTRIBUTE_ALWAYS_INLINE ~ref() noexcept { ref_type_release<T>(get()); }
+ IREE_ATTRIBUTE_ALWAYS_INLINE ~ref() noexcept { ref_type_release<T>(get()); }
// Don't use implicit ref copying; use retain_ref instead to make things more
// readable. We can't delete the ctor (or, I couldn't find a way not to)
@@ -308,7 +308,7 @@
// its reference count decremented and resets the ref to empty.
// Returns nullptr if the ref holds no value.
// To re-wrap in a ref use either ref<T>(value) or assign().
- ABSL_ATTRIBUTE_ALWAYS_INLINE T* release() noexcept {
+ IREE_ATTRIBUTE_ALWAYS_INLINE T* release() noexcept {
T* p = get();
ref_.ptr = nullptr;
return p;
@@ -317,7 +317,7 @@
// Assigns a pointer.
// The pointer will be accepted by the ref and its reference count will
// not be incremented.
- ABSL_ATTRIBUTE_ALWAYS_INLINE void assign(T* value) noexcept {
+ IREE_ATTRIBUTE_ALWAYS_INLINE void assign(T* value) noexcept {
reset();
ref_.ptr = value;
}