[cfe-commits] r118223 - in /cfe/trunk: include/clang-c/Index.h tools/libclang/CIndex.cpp tools/libclang/libclang.darwin.exports tools/libclang/libclang.exports

Daniel Dunbar daniel at zuster.org
Wed Nov 3 18:26:29 PDT 2010


Author: ddunbar
Date: Wed Nov  3 20:26:29 2010
New Revision: 118223

URL: http://llvm.org/viewvc/llvm-project?rev=118223&view=rev
Log:
libclang: Add clang_executeOnThread, for use in c-index-test (and only there,
preferably). Good thing c-index-test is written in C!!!!

Modified:
    cfe/trunk/include/clang-c/Index.h
    cfe/trunk/tools/libclang/CIndex.cpp
    cfe/trunk/tools/libclang/libclang.darwin.exports
    cfe/trunk/tools/libclang/libclang.exports

Modified: cfe/trunk/include/clang-c/Index.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang-c/Index.h?rev=118223&r1=118222&r2=118223&view=diff
==============================================================================
--- cfe/trunk/include/clang-c/Index.h (original)
+++ cfe/trunk/include/clang-c/Index.h Wed Nov  3 20:26:29 2010
@@ -2208,6 +2208,9 @@
                                           unsigned *endLine,
                                           unsigned *endColumn);
 CINDEX_LINKAGE void clang_enableStackTraces(void);
+CINDEX_LINKAGE void clang_executeOnThread(void (*fn)(void*), void *user_data,
+                                          unsigned stack_size);
+
 /**
  * @}
  */

Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=118223&r1=118222&r2=118223&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Wed Nov  3 20:26:29 2010
@@ -3562,6 +3562,11 @@
   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"
 
 //===----------------------------------------------------------------------===//

Modified: cfe/trunk/tools/libclang/libclang.darwin.exports
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/libclang.darwin.exports?rev=118223&r1=118222&r2=118223&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/libclang.darwin.exports (original)
+++ cfe/trunk/tools/libclang/libclang.darwin.exports Wed Nov  3 20:26:29 2010
@@ -25,6 +25,7 @@
 _clang_disposeTokens
 _clang_disposeTranslationUnit
 _clang_enableStackTraces
+_clang_executeOnThread
 _clang_equalCursors
 _clang_equalLocations
 _clang_equalTypes

Modified: cfe/trunk/tools/libclang/libclang.exports
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/libclang.exports?rev=118223&r1=118222&r2=118223&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/libclang.exports (original)
+++ cfe/trunk/tools/libclang/libclang.exports Wed Nov  3 20:26:29 2010
@@ -25,6 +25,7 @@
 clang_disposeTokens
 clang_disposeTranslationUnit
 clang_enableStackTraces
+clang_executeOnThread
 clang_equalCursors
 clang_equalLocations
 clang_equalTypes





More information about the cfe-commits mailing list