From a75e74c454066abe0741256b48360594debf2924 Mon Sep 17 00:00:00 2001
From: br
Date: Fri, 22 Jan 2016 16:42:06 +0000
Subject: Add stubs for RISC-V ISA so libunwind can be compiled.
Reviewed by: emaste
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D5035
---
contrib/llvm/projects/libunwind/src/libunwind.cpp | 3 +++
1 file changed, 3 insertions(+)
(limited to 'contrib/llvm/projects/libunwind/src/libunwind.cpp')
diff --git a/contrib/llvm/projects/libunwind/src/libunwind.cpp b/contrib/llvm/projects/libunwind/src/libunwind.cpp
index f9f32f0..c4e3e45 100644
--- a/contrib/llvm/projects/libunwind/src/libunwind.cpp
+++ b/contrib/llvm/projects/libunwind/src/libunwind.cpp
@@ -66,6 +66,9 @@ _LIBUNWIND_EXPORT int unw_init_local(unw_cursor_t *cursor,
context, LocalAddressSpace::sThisAddressSpace);
#elif defined(__mips__)
#warning The MIPS architecture is not supported.
+#elif defined(__riscv__)
+ new ((void *)cursor) UnwindCursor(
+ context, LocalAddressSpace::sThisAddressSpace);
#else
#error Architecture not supported
#endif
--
cgit v1.1