diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-02-18 20:22:25 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-02-18 20:22:25 +0000 |
commit | 81d53769b5f7029a2c8bb1ebb4dc3ea3c2cb59b6 (patch) | |
tree | 13b654e41f2828b1b5ee50c9ebfb9a3629399d18 /clang/tools/CIndex/CIndex.cpp | |
parent | 707cf72cb8ef3ed3a66e4667eeb27ec235fe2376 (diff) | |
download | bcm5719-llvm-81d53769b5f7029a2c8bb1ebb4dc3ea3c2cb59b6.tar.gz bcm5719-llvm-81d53769b5f7029a2c8bb1ebb4dc3ea3c2cb59b6.zip |
Introduce debugging/testing hook clang_enableStackTraces() into
CIndex, so that c-index-test to use it to call
lvm::sys::PrintStackTraceOnErrorSignal().
llvm-svn: 96607
Diffstat (limited to 'clang/tools/CIndex/CIndex.cpp')
-rw-r--r-- | clang/tools/CIndex/CIndex.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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 <cstdio> @@ -1935,6 +1936,10 @@ void clang_getDefinitionSpellingAndExtent(CXCursor C, *endColumn = SM.getSpellingColumnNumber(Body->getRBracLoc()); } +void clang_enableStackTraces(void) { + llvm::sys::PrintStackTraceOnErrorSignal(); +} + } // end: extern "C" //===----------------------------------------------------------------------===// |