Appease hosts without HAVE_BACKTRACE nor ENABLE_BACKTRACES.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 8 Nov 2015 09:45:06 +0000 (09:45 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 8 Nov 2015 09:45:06 +0000 (09:45 +0000)
  llvm/lib/Support/Signals.cpp:66:13: warning: unused function 'printSymbolizedStackTrace' [-Wunused-function]
  llvm/lib/Support/Signals.cpp:52:13: warning: function 'findModulesAndOffsets' has internal linkage but is not defined [-Wundefined-internal]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252418 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/Signals.cpp
lib/Support/Unix/Signals.inc

index 0348c9f6651818932af2302962bff06cad122a33..3dc6b7c99d01f1c61e153722ee36aebaf5218041 100644 (file)
@@ -62,6 +62,10 @@ static FormattedNumber format_ptr(void *PC) {
   return format_hex((uint64_t)PC, PtrWidth);
 }
 
   return format_hex((uint64_t)PC, PtrWidth);
 }
 
+static bool printSymbolizedStackTrace(void **StackTrace, int Depth,
+                                      llvm::raw_ostream &OS)
+  LLVM_ATTRIBUTE_USED;
+
 /// Helper that launches llvm-symbolizer and symbolizes a backtrace.
 static bool printSymbolizedStackTrace(void **StackTrace, int Depth,
                                       llvm::raw_ostream &OS) {
 /// Helper that launches llvm-symbolizer and symbolizes a backtrace.
 static bool printSymbolizedStackTrace(void **StackTrace, int Depth,
                                       llvm::raw_ostream &OS) {
index fb1b400ba2f51e94174e61d4b1aedb7bfd6d9a52..d6d30bf0cb30453f87f08a002ecb8ae3143bc134 100644 (file)
@@ -306,6 +306,13 @@ static bool findModulesAndOffsets(void **StackTrace, int Depth,
   return false;
 }
 #endif
   return false;
 }
 #endif
+#else
+static bool findModulesAndOffsets(void **StackTrace, int Depth,
+                                  const char **Modules, intptr_t *Offsets,
+                                  const char *MainExecutableName,
+                                  StringSaver &StrPool) {
+  return false;
+}
 #endif // defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES)
 
 // PrintStackTrace - In the case of a program crash or fault, print out a stack
 #endif // defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES)
 
 // PrintStackTrace - In the case of a program crash or fault, print out a stack