Skip to content

[libunwind][WebAssembly] Fix libunwind.cpp guard #78230

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

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

aheejin
Copy link
Member

@aheejin aheejin commented Jan 16, 2024

This should have been &&, meaning neither SjLj nor Wasm uses this file.

This should have been `&&`, meaning neither SjLj nor Wasm uses this
file.
@llvmbot
Copy link
Member

llvmbot commented Jan 16, 2024

@llvm/pr-subscribers-libunwind

Author: Heejin Ahn (aheejin)

Changes

This should have been &&, meaning neither SjLj nor Wasm uses this file.


Full diff: https://github.com/llvm/llvm-project/pull/78230.diff

1 Files Affected:

  • (modified) libunwind/src/libunwind.cpp (+2-2)
diff --git a/libunwind/src/libunwind.cpp b/libunwind/src/libunwind.cpp
index cd610377b63de8..f3c32762a5954b 100644
--- a/libunwind/src/libunwind.cpp
+++ b/libunwind/src/libunwind.cpp
@@ -26,7 +26,7 @@
 #include <sanitizer/asan_interface.h>
 #endif
 
-#if !defined(__USING_SJLJ_EXCEPTIONS__) || !defined(__USING_WASM_EXCEPTIONS__)
+#if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__USING_WASM_EXCEPTIONS__)
 #include "AddressSpace.hpp"
 #include "UnwindCursor.hpp"
 
@@ -347,7 +347,7 @@ void __unw_remove_dynamic_eh_frame_section(unw_word_t eh_frame_start) {
 }
 
 #endif // defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND)
-#endif // !defined(__USING_SJLJ_EXCEPTIONS__) ||
+#endif // !defined(__USING_SJLJ_EXCEPTIONS__) &&
        // !defined(__USING_WASM_EXCEPTIONS__)
 
 #ifdef __APPLE__

@ldionne ldionne merged commit 4967d98 into llvm:main Jan 16, 2024
@aheejin aheejin deleted the libunwind_fix branch January 16, 2024 18:16
Copy link
Contributor

@kaz7 kaz7 left a comment

Choose a reason for hiding this comment

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

It's compilable on VE now. Thank you!

@MaskRay
Copy link
Member

MaskRay commented Jan 17, 2024

This should have been &&, meaning neither SjLj nor Wasm uses this file.

Thanks for the description. In the future, it'd be better to reference what PR this PR fixes.

justinfargnoli pushed a commit to justinfargnoli/llvm-project that referenced this pull request Jan 28, 2024
This should have been `&&`, meaning neither SjLj nor Wasm uses this
file.
aheejin added a commit to aheejin/emscripten that referenced this pull request Mar 25, 2024
Most of the changes seem irrelevant to us given that we only use
`Uniwnd-wasm.cpp`. Changes related to Wasm are what I submitted upstream
for adding the file to `CMakeLists.txt` and fixing some guards:
llvm/llvm-project#67770
llvm/llvm-project#73196
llvm/llvm-project#78230
aheejin added a commit to emscripten-core/emscripten that referenced this pull request Mar 26, 2024
Most of the changes seem irrelevant to us given that we only use
`Uniwnd-wasm.cpp`. Changes related to Wasm are what I submitted upstream
for adding the file to `CMakeLists.txt` and fixing some guards:
llvm/llvm-project#67770
llvm/llvm-project#73196
llvm/llvm-project#78230
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants