From 81d53769b5f7029a2c8bb1ebb4dc3ea3c2cb59b6 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 18 Feb 2010 20:22:25 +0000 Subject: Introduce debugging/testing hook clang_enableStackTraces() into CIndex, so that c-index-test to use it to call lvm::sys::PrintStackTraceOnErrorSignal(). llvm-svn: 96607 --- clang/tools/CIndex/CIndex.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/tools/CIndex/CIndex.cpp') diff --git a/clang/tools/CIndex/CIndex.cpp b/clang/tools/CIndex/CIndex.cpp index 128b3b6e992..6e07ece4c35 100644 --- a/clang/tools/CIndex/CIndex.cpp +++ b/clang/tools/CIndex/CIndex.cpp @@ -27,6 +27,7 @@ #include "clang/Lex/Preprocessor.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/System/Program.h" +#include "llvm/System/Signals.h" // Needed to define L_TMPNAM on some systems. #include @@ -1935,6 +1936,10 @@ void clang_getDefinitionSpellingAndExtent(CXCursor C, *endColumn = SM.getSpellingColumnNumber(Body->getRBracLoc()); } +void clang_enableStackTraces(void) { + llvm::sys::PrintStackTraceOnErrorSignal(); +} + } // end: extern "C" //===----------------------------------------------------------------------===// -- cgit v1.2.3