[JITLink][i386] Avoid 'i386' name clashing with built-in macro #137063
+48
−48
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When compiling llvm on an actual i386 platform, both clang and gcc define a built-in macro
i386
to the value 1. This clashes with thellvm::jitlink::i386
namespace:The macro name 'i386' is obviously a historical bad choice, but since it existed long before llvm, llvm should either rename its namespace, or actively undefine the macro in
i386.h
(similar to e.g. https://github.com/google/swiftshader/blob/master/third_party/llvm-16.0/Android.bp#L1510).This particular pull request implements the rename, but is meant to gauge opinions on how to solve this issue.