-
Notifications
You must be signed in to change notification settings - Fork 10
Add support for LLVM 19 and 20 (not CI tested) #13
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
Changes from all commits
e2ca641
2ed94a6
fa88ac5
2ea3d34
1cb739a
709ec3a
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 |
|---|---|---|
|
|
@@ -106,7 +106,7 @@ class CgNode { | |
| } | ||
|
|
||
| auto nmd = new T(args...); | ||
| this->template addMetaData(nmd); | ||
|
Member
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 think this is a change that is not related to the ability to use newer llvm versions. Am I missing something?
Member
Author
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. Yes, it is related. Using the This works in previous LLVM and GCC versions, but is not standard compliant. Since LLVM 19 (?) this is handled more strictly and results in the error shown above.
Member
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. So this is enabling the compilation with Clang 19 and beyond?
Member
Author
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. It's both - enabling the CGCollector to work with Clang 19+ and compiling the project as a whole with thise Clang versions.
Member
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. How is this particular change with the |
||
| this->addMetaData(nmd); | ||
| return nmd; | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -36,8 +36,8 @@ class MetaDataFactory { | |||||||||
| template <class... T> | ||||||||||
| static CRTPBase* create(const std::string& s, const nlohmann::json& j) { | ||||||||||
| if (data().find(s) == data().end()) { | ||||||||||
| MCGLogger::instance().getErrConsole()->template warn( | ||||||||||
| "Could not create: {}, the Metadata is unknown in you application", s); | ||||||||||
| MCGLogger::instance().getErrConsole()->warn("Could not create: {}, the Metadata is unknown in you application", | ||||||||||
| s); | ||||||||||
|
Comment on lines
+39
to
+40
Member
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 to have the error in one single line, instead of having only the formatting parameter in a new line.
Suggested change
Member
Author
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'm inclined to agree. Unfortunately clang-format does not and automatically changes it back to the original version 😄 |
||||||||||
| return nullptr; | ||||||||||
| } | ||||||||||
| return data().at(s)(j); | ||||||||||
|
|
@@ -48,7 +48,7 @@ class MetaDataFactory { | |||||||||
| friend T; | ||||||||||
|
|
||||||||||
| static bool registerT() { | ||||||||||
| MCGLogger::instance().getConsole()->template trace("Registering {} \n", T::key); | ||||||||||
| MCGLogger::instance().getConsole()->trace("Registering {} \n", T::key); | ||||||||||
| const auto name = T::key; | ||||||||||
| MetaDataFactory::data()[name] = [](const nlohmann::json& j) -> CRTPBase* { return new T(j); }; | ||||||||||
| return true; | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -240,15 +240,15 @@ class PiraOneData : public metacg::MetaData::Registrar<PiraOneData> { | |
| template <typename T> | ||
| inline void setPiraOneData(T node, int numStmts = 0, bool hasBody = false, bool dominantRuntime = false, | ||
| bool inPrevProfile = false) { | ||
| const auto& [has, data] = node->template checkAndGet<PiraOneData>(); | ||
| if (has) { | ||
| data->setNumberOfStatements(numStmts); | ||
| data->setHasBody(hasBody); | ||
| data->setDominantRuntime(dominantRuntime); | ||
| data->setComesFromCube(inPrevProfile); | ||
| } else { | ||
| assert_pira_one_data(); | ||
| } | ||
| const auto& [has, data] = node->template checkAndGet<PiraOneData>(); | ||
| if (has) { | ||
| data->setNumberOfStatements(numStmts); | ||
| data->setHasBody(hasBody); | ||
| data->setDominantRuntime(dominantRuntime); | ||
| data->setComesFromCube(inPrevProfile); | ||
|
Comment on lines
+243
to
+248
Member
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. Is this a formatting error or correction?
Member
Author
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. This is a correction. I touched the file at some point so it was auto-formatted.
Member
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. Yes, leave it in. |
||
| } else { | ||
| assert_pira_one_data(); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
|
|
||
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.
I think this can remain at the original position.