Skip to content
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

Extend preprocessor LLVM version checks to support LLVM 4.x #36742

Merged
merged 1 commit into from Sep 27, 2016

Conversation

shepmaster
Copy link
Member

This doesn't actually do anything for LLVM 4.x yet, but sets the stage.

@rust-highfive
Copy link
Collaborator

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@sanxiyn
Copy link
Member

sanxiyn commented Sep 26, 2016

cc #36295

Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @shepmaster! Looks great to me.

@@ -45,7 +45,16 @@
#include "llvm-c/ExecutionEngine.h"
#include "llvm-c/Object.h"

#if LLVM_VERSION_MINOR >= 7
#define LLVM_VERSION_GT_OR_EQ(major, minor) \
LLVM_VERSION_MAJOR > (major) || LLVM_VERSION_MAJOR == (major) && LLVM_VERSION_MINOR >= (minor)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this entire clause also be wrapped in parens? (yay C macros)

same below as well

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Someone should really work on creating a replacement for this C language thing.

@@ -45,7 +45,16 @@
#include "llvm-c/ExecutionEngine.h"
#include "llvm-c/Object.h"

#if LLVM_VERSION_MINOR >= 7
#define LLVM_VERSION_GT_OR_EQ(major, minor) \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this could be LLVM_VERSION_GE?

Similar to ParialOrd::ge naming at least

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

This doesn't actually do anything for LLVM 4.x yet, but sets the stage.
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Sep 26, 2016

📌 Commit e6e117c has been approved by alexcrichton

sophiajt pushed a commit to sophiajt/rust that referenced this pull request Sep 26, 2016
…richton

Extend preprocessor LLVM version checks to support LLVM 4.x

This doesn't actually do anything for LLVM 4.x yet, but sets the stage.
sophiajt pushed a commit to sophiajt/rust that referenced this pull request Sep 27, 2016
…richton

Extend preprocessor LLVM version checks to support LLVM 4.x

This doesn't actually do anything for LLVM 4.x yet, but sets the stage.
bors added a commit that referenced this pull request Sep 27, 2016
@bors bors merged commit e6e117c into rust-lang:master Sep 27, 2016
@shepmaster shepmaster deleted the llvm-4-preamble branch November 18, 2016 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants