-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[lld][MachO] Fix warning while building for wasm #120889
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
Conversation
@llvm/pr-subscribers-lld-macho Author: Anutosh Bhat (anutosh491) ChangesWhile building clang & lld against emscripten for wasm, I see the following
Casting Full diff: https://github.com/llvm/llvm-project/pull/120889.diff 1 Files Affected:
diff --git a/lld/MachO/SyntheticSections.cpp b/lld/MachO/SyntheticSections.cpp
index 28fb8047cacd9a..0806448f921aad 100644
--- a/lld/MachO/SyntheticSections.cpp
+++ b/lld/MachO/SyntheticSections.cpp
@@ -2084,7 +2084,7 @@ void ObjCMethListSection::writeTo(uint8_t *bufStart) const {
uint32_t writtenSize = writeRelativeMethodList(isec, buf);
buf += writtenSize;
}
- assert(buf - bufStart == sectionSize &&
+ assert(buf - bufStart == long(sectionSize) &&
"Written size does not match expected section size");
}
|
@llvm/pr-subscribers-lld Author: Anutosh Bhat (anutosh491) ChangesWhile building clang & lld against emscripten for wasm, I see the following
Casting Full diff: https://github.com/llvm/llvm-project/pull/120889.diff 1 Files Affected:
diff --git a/lld/MachO/SyntheticSections.cpp b/lld/MachO/SyntheticSections.cpp
index 28fb8047cacd9a..0806448f921aad 100644
--- a/lld/MachO/SyntheticSections.cpp
+++ b/lld/MachO/SyntheticSections.cpp
@@ -2084,7 +2084,7 @@ void ObjCMethListSection::writeTo(uint8_t *bufStart) const {
uint32_t writtenSize = writeRelativeMethodList(isec, buf);
buf += writtenSize;
}
- assert(buf - bufStart == sectionSize &&
+ assert(buf - bufStart == long(sectionSize) &&
"Written size does not match expected section size");
}
|
cc @alexey-bataev |
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.
Seems ok to me, but one small suggestion.
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.
LGTM, but let's wait a bit longer to see if we get a review from someone with more context here.
Haven't heard on this yet. I guess it is ready to go in ? |
Sounds good. Thanks! |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/197/builds/263 Here is the relevant piece of the build log for the reference
|
While building clang & lld against emscripten for wasm, I see the following
Casting
sectionSize
usinglong
should be enough I think