Ignore:
Timestamp:
Apr 19, 2011, 11:12:07 PM (14 years ago)
Author:
Yuri Dario
Message:

clamav: update trunk to 0.97.

Location:
clamav/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • clamav/trunk

  • TabularUnified clamav/trunk/libclamav/c++/llvm/lib/Support/PrettyStackTrace.cpp

    r189 r319  
    1313//===----------------------------------------------------------------------===//
    1414
     15#include "llvm/Config/config.h"     // Get autoconf configuration settings
    1516#include "llvm/Support/PrettyStackTrace.h"
    1617#include "llvm/Support/raw_ostream.h"
     
    1819#include "llvm/System/ThreadLocal.h"
    1920#include "llvm/ADT/SmallString.h"
     21
     22#ifdef HAVE_CRASHREPORTERCLIENT_H
     23#include <CrashReporterClient.h>
     24#endif
     25
    2026using namespace llvm;
    2127
     
    4955}
    5056
    51 // Integrate with crash reporter.
    52 #ifdef __APPLE__
    53 extern "C" const char *__crashreporter_info__;
    54 const char *__crashreporter_info__ = 0;
     57// Integrate with crash reporter libraries.
     58#if defined (__APPLE__) && HAVE_CRASHREPORTERCLIENT_H
     59//  If any clients of llvm try to link to libCrashReporterClient.a themselves,
     60//  only one crash info struct will be used.
     61extern "C" {
     62CRASH_REPORTER_CLIENT_HIDDEN
     63struct crashreporter_annotations_t gCRAnnotations
     64        __attribute__((section("__DATA," CRASHREPORTER_ANNOTATIONS_SECTION)))
     65        = { CRASHREPORTER_ANNOTATIONS_VERSION, 0, 0, 0, 0 };
     66}
     67#elif defined (__APPLE__) && HAVE_CRASHREPORTER_INFO
     68static const char *__crashreporter_info__ = 0;
     69asm(".desc ___crashreporter_info__, 0x10");
    5570#endif
    5671
     
    5873/// CrashHandler - This callback is run if a fatal signal is delivered to the
    5974/// process, it prints the pretty stack trace.
    60 static void CrashHandler(void *Cookie) {
     75static void CrashHandler(void *) {
    6176#ifndef __APPLE__
    6277  // On non-apple systems, just emit the crash stack trace to stderr.
     
    7287 
    7388  if (!TmpStr.empty()) {
     89#ifdef HAVE_CRASHREPORTERCLIENT_H
     90    // Cast to void to avoid warning.
     91    (void)CRSetCrashLogMessage(std::string(TmpStr.str()).c_str());
     92#elif HAVE_CRASHREPORTER_INFO
    7493    __crashreporter_info__ = strdup(std::string(TmpStr.str()).c_str());
     94#endif
    7595    errs() << TmpStr.str();
    7696  }
Note: See TracChangeset for help on using the changeset viewer.