[PATCH] Rename *.c to *.cpp to generate unwind tables for these functions.

Logan Chien tzuhsiang.chien at gmail.com
Sat Jan 17 00:11:38 PST 2015


Hi danalbert, rengolin, jroelofs,

If we compile these *.c files with arm-linux-gnueabi-gcc, gcc won't
generate the unwind table by default.  As the result, the _Unwind_Backtrace
can't unwind through itself.

This change fix the problem by renaming *.c to *.cpp.

(p.s. This is the 5/6 patch to fix the backtrace_test and libgcc support.)

http://reviews.llvm.org/D7033

Files:
  src/Unwind/CMakeLists.txt
  src/Unwind/Unwind-sjlj.c
  src/Unwind/Unwind-sjlj.cpp
  src/Unwind/UnwindLevel1-gcc-ext.c
  src/Unwind/UnwindLevel1-gcc-ext.cpp
  src/Unwind/UnwindLevel1.c
  src/Unwind/UnwindLevel1.cpp

Index: src/Unwind/CMakeLists.txt
===================================================================
--- src/Unwind/CMakeLists.txt
+++ src/Unwind/CMakeLists.txt
@@ -2,9 +2,9 @@
 set(LIBUNWIND_SOURCES
   libunwind.cpp
   Unwind-EHABI.cpp
-  UnwindLevel1.c
-  UnwindLevel1-gcc-ext.c
-  Unwind-sjlj.c
+  UnwindLevel1.cpp
+  UnwindLevel1-gcc-ext.cpp
+  Unwind-sjlj.cpp
 )
 
 append_if(LIBUNWIND_SOURCES APPLE Unwind_AppleExtras.cpp)
Index: src/Unwind/Unwind-sjlj.cpp
===================================================================
--- src/Unwind/Unwind-sjlj.cpp
+++ src/Unwind/Unwind-sjlj.cpp
@@ -1,4 +1,4 @@
-//===--------------------------- Unwind-sjlj.c ----------------------------===//
+//===-------------------------- Unwind-sjlj.cpp ---------------------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
Index: src/Unwind/UnwindLevel1-gcc-ext.cpp
===================================================================
--- src/Unwind/UnwindLevel1-gcc-ext.cpp
+++ src/Unwind/UnwindLevel1-gcc-ext.cpp
@@ -1,4 +1,4 @@
-//===--------------------- UnwindLevel1-gcc-ext.c -------------------------===//
+//===-------------------- UnwindLevel1-gcc-ext.cpp ------------------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
Index: src/Unwind/UnwindLevel1.cpp
===================================================================
--- src/Unwind/UnwindLevel1.cpp
+++ src/Unwind/UnwindLevel1.cpp
@@ -1,4 +1,4 @@
-//===------------------------- UnwindLevel1.c -----------------------------===//
+//===------------------------ UnwindLevel1.cpp ----------------------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7033.18340.patch
Type: text/x-patch
Size: 1686 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150117/b99aad9c/attachment.bin>


More information about the cfe-commits mailing list