]> granicus.if.org Git - clang/commitdiff
libclang: Add clang_executeOnThread, for use in c-index-test (and only there,
authorDaniel Dunbar <daniel@zuster.org>
Thu, 4 Nov 2010 01:26:29 +0000 (01:26 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 4 Nov 2010 01:26:29 +0000 (01:26 +0000)
preferably). Good thing c-index-test is written in C!!!!

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

include/clang-c/Index.h
tools/libclang/CIndex.cpp
tools/libclang/libclang.darwin.exports
tools/libclang/libclang.exports

index 20c8c1199460cbc59b2488797d6807d6c9b3eeb1..96b4088a69fdba6754ec9fc07c4320bbaaada22c 100644 (file)
@@ -2208,6 +2208,9 @@ CINDEX_LINKAGE void clang_getDefinitionSpellingAndExtent(CXCursor,
                                           unsigned *endLine,
                                           unsigned *endColumn);
 CINDEX_LINKAGE void clang_enableStackTraces(void);
+CINDEX_LINKAGE void clang_executeOnThread(void (*fn)(void*), void *user_data,
+                                          unsigned stack_size);
+
 /**
  * @}
  */
index 3afe3007ea0e31302e6357794977350065a4ea15..0d660da98deab3f118346802f2dd5e2f9ad2eb1f 100644 (file)
@@ -3562,6 +3562,11 @@ void clang_enableStackTraces(void) {
   llvm::sys::PrintStackTraceOnErrorSignal();
 }
 
+void clang_executeOnThread(void (*fn)(void*), void *user_data,
+                           unsigned stack_size) {
+  llvm::llvm_execute_on_thread(fn, user_data, stack_size);
+}
+
 } // end: extern "C"
 
 //===----------------------------------------------------------------------===//
index e9d40d0a754992eda4f4c49acd04aeeeaa78a0f2..7d5ae8b7327e7651caf3e56d125b636303632cb1 100644 (file)
@@ -25,6 +25,7 @@ _clang_disposeString
 _clang_disposeTokens
 _clang_disposeTranslationUnit
 _clang_enableStackTraces
+_clang_executeOnThread
 _clang_equalCursors
 _clang_equalLocations
 _clang_equalTypes
index fd96be35b2965d2c26a67153bbd25ac44b5a616a..da7f9c851fb66bc2e59c2aeef6259f7ee44da100 100644 (file)
@@ -25,6 +25,7 @@ clang_disposeString
 clang_disposeTokens
 clang_disposeTranslationUnit
 clang_enableStackTraces
+clang_executeOnThread
 clang_equalCursors
 clang_equalLocations
 clang_equalTypes