-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
a few c++ fixes to allow compilation on Windows #2282
Changes from 1 commit
bdef7ad
ba2a9a2
03b03f4
e599b93
761e977
5bafb63
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ | |
|
||
#include <stdlib.h> | ||
#include <stdbool.h> | ||
#include <stdint.h> | ||
|
||
#include <migraphx/api/export.h> | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ | |
#include <migraphx/json.hpp> | ||
#include <migraphx/version.h> | ||
|
||
#include <migraphx/instruction.hpp> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where are we using the instruction class in this file? I cant seem to find it. |
||
#include <migraphx/dead_code_elimination.hpp> | ||
#include <migraphx/eliminate_identity.hpp> | ||
#include <migraphx/eliminate_pad.hpp> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -333,7 +333,7 @@ enum class color | |
bg_blue = 44, | ||
bg_default = 49 | ||
}; | ||
inline std::ostream& operator<<(std::ostream& os, const color& c) | ||
inline std::ostream& operator<<(std::ostream& os, [[maybe_unused]] const color& c) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would prefer a |
||
{ | ||
#ifndef _WIN32 | ||
static const bool use_color = isatty(STDOUT_FILENO) != 0; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ | |
#include <migraphx/program.hpp> | ||
#include <migraphx/dead_code_elimination.hpp> | ||
#include <migraphx/eliminate_common_subexpression.hpp> | ||
#include <migraphx/instruction.hpp> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We dont use the instruction class here either, at least as far as I can tell. If windows has problems with incomplete types then maybe we should add this header in instruction_ref.hpp under |
||
#include <migraphx/pass_manager.hpp> | ||
#include <migraphx/make_op.hpp> | ||
#include <migraphx/serialize.hpp> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ | |
|
||
#include <stdlib.h> | ||
#include <stdbool.h> | ||
#include <stdint.h> | ||
|
||
#include <migraphx/api/export.h> | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does it requires check for clang. Aren't both exclusive if it is MSVC, it can't be clang.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Clang compiler on Windows is running in MSVC compatibility mode. It sets
_MSC_VER
, too. So, only checking_MSC_VER
is not exclusive and is insufficient to differentiate between native MSVC and Clang. See detailed information https://clang.llvm.org/docs/MSVCCompatibility.html