]> granicus.if.org Git - clang/commitdiff
Rename 'CIndex' to 'libclang', since it has basically become our stable public
authorDaniel Dunbar <daniel@zuster.org>
Fri, 30 Apr 2010 21:51:10 +0000 (21:51 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 30 Apr 2010 21:51:10 +0000 (21:51 +0000)
(C) API, and will likely grow further in this direction in the future.

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

21 files changed:
bindings/python/README.txt
bindings/python/clang/cindex.py
tools/CMakeLists.txt
tools/Makefile
tools/c-index-test/CMakeLists.txt
tools/c-index-test/Makefile
tools/libclang/CIndex.cpp [moved from tools/CIndex/CIndex.cpp with 100% similarity]
tools/libclang/CIndexCodeCompletion.cpp [moved from tools/CIndex/CIndexCodeCompletion.cpp with 100% similarity]
tools/libclang/CIndexDiagnostic.cpp [moved from tools/CIndex/CIndexDiagnostic.cpp with 100% similarity]
tools/libclang/CIndexDiagnostic.h [moved from tools/CIndex/CIndexDiagnostic.h with 100% similarity]
tools/libclang/CIndexInclusionStack.cpp [moved from tools/CIndex/CIndexInclusionStack.cpp with 100% similarity]
tools/libclang/CIndexUSRs.cpp [moved from tools/CIndex/CIndexUSRs.cpp with 100% similarity]
tools/libclang/CIndexer.cpp [moved from tools/CIndex/CIndexer.cpp with 100% similarity]
tools/libclang/CIndexer.h [moved from tools/CIndex/CIndexer.h with 100% similarity]
tools/libclang/CMakeLists.txt [moved from tools/CIndex/CMakeLists.txt with 77% similarity]
tools/libclang/CXCursor.cpp [moved from tools/CIndex/CXCursor.cpp with 100% similarity]
tools/libclang/CXCursor.h [moved from tools/CIndex/CXCursor.h with 100% similarity]
tools/libclang/CXSourceLocation.h [moved from tools/CIndex/CXSourceLocation.h with 100% similarity]
tools/libclang/Makefile [moved from tools/CIndex/Makefile with 93% similarity]
tools/libclang/libclang.darwin.exports [moved from tools/CIndex/CIndex.darwin.exports with 100% similarity]
tools/libclang/libclang.exports [moved from tools/CIndex/CIndex.exports with 100% similarity]

index ccc2619ccf5b752351723f552ac0d74f52277fae..742cf8fbb8fc5c3f3c21aad951facab63919980e 100644 (file)
@@ -2,10 +2,9 @@
 // Clang Python Bindings
 //===----------------------------------------------------------------------===//
 
-This directory implements Python bindings for Clang. Currently, only bindings
-for the CIndex C API exist.
+This directory implements Python bindings for Clang.
 
-You may need to alter LD_LIBRARY_PATH so that the CIndex library can be
+You may need to alter LD_LIBRARY_PATH so that the Clang library can be
 found. The unit tests are designed to be run with 'nosetests'. For example:
 --
 $ env PYTHONPATH=$(echo ~/llvm/tools/clang/bindings/python/) \
index f4409aec33253ed95099b19d6e8f10ecf88183d1..f0f81b5d6948c4e8a0360ca3022341a9fa5d892d 100644 (file)
@@ -71,11 +71,11 @@ def get_cindex_library():
     import platform
     name = platform.system()
     if name == 'Darwin':
-        return cdll.LoadLibrary('libCIndex.dylib')
+        return cdll.LoadLibrary('libclang.dylib')
     elif name == 'Windows':
-        return cdll.LoadLibrary('libCIndex.dll')
+        return cdll.LoadLibrary('libclang.dll')
     else:
-        return cdll.LoadLibrary('libCIndex.so')
+        return cdll.LoadLibrary('libclang.so')
 
 # ctypes doesn't implicitly convert c_void_p to the appropriate wrapper
 # object. This is a problem, because it means that from_parameter will see an
index 64c3a213cd7862650a0c02980631bc7443dab899..ae33b782d49d24ad2c05886eb7bcfb4278bb301a 100644 (file)
@@ -1,3 +1,3 @@
-add_subdirectory(CIndex)
+add_subdirectory(libclang)
 add_subdirectory(c-index-test)
 add_subdirectory(driver)
index bfd5ad12f93d23fa7a085aa8b398f61ff039104b..8407dfdedde7ddf9c6762aa80e18bd391f734df1 100644 (file)
@@ -8,12 +8,12 @@
 ##===----------------------------------------------------------------------===##
 
 LEVEL := ../../..
-DIRS := driver CIndex c-index-test
+DIRS := driver libclang c-index-test
 
 include $(LEVEL)/Makefile.config
 
 ifeq ($(OS), $(filter $(OS), Cygwin MingW))
-DIRS := $(filter-out CIndex c-index-test, $(DIRS))
+DIRS := $(filter-out libclang c-index-test, $(DIRS))
 endif
 
 include $(LEVEL)/Makefile.common
index f0a34a57987e624dcb6f10a4f9234373bdd54d9b..d965fd2b51e2bbe4edabc72d81befd1c9ad61425 100644 (file)
@@ -1,7 +1,7 @@
 set(LLVM_NO_RTTI 1)
 
 set( LLVM_USED_LIBS
-  CIndex
+  libclang
   clangIndex
   clangFrontend
   clangDriver
index 141256361763147dc4a6484c6d5ca36b45881b31..24fed16006dd9d0c2c8c9f09db4eece392c2ade7 100644 (file)
@@ -17,7 +17,7 @@ TOOL_NO_EXPORTS = 1
 include $(LEVEL)/Makefile.config
 
 LINK_COMPONENTS := bitreader mc core
-USEDLIBS = CIndex.a clangIndex.a clangFrontend.a clangDriver.a clangSema.a \
+USEDLIBS = clang.a clangIndex.a clangFrontend.a clangDriver.a clangSema.a \
           clangAnalysis.a clangAST.a clangParse.a clangLex.a clangBasic.a
 
 include $(LLVM_SRC_ROOT)/Makefile.rules
similarity index 77%
rename from tools/CIndex/CMakeLists.txt
rename to tools/libclang/CMakeLists.txt
index 609719e627fd8912d2a6eae4b0b1e31c6b29eb87..df4884be61d6ad3602d8469f39d53d94a7045ccd 100644 (file)
@@ -18,7 +18,7 @@ set( LLVM_LINK_COMPONENTS
   core
   )
 
-add_clang_library(CIndex
+add_clang_library(libclang
   CIndex.cpp
   CIndexCodeCompletion.cpp
   CIndexDiagnostic.cpp
@@ -28,6 +28,7 @@ add_clang_library(CIndex
   CXCursor.cpp
   ../../include/clang-c/Index.h
 )
+set_target_properties(libclang PROPERTIES OUTPUT_NAME clang)
 
 if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
   # FIXME: Deal with LLVM_SUBMIT_VERSION?
@@ -36,9 +37,9 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
   # get underscore-prefixed names. It would be better to have build rules
   # which know how to produce a darwin-suitable exports file from the
   # regular exports file.
-  set_target_properties(CIndex
+  set_target_properties(libclang
     PROPERTIES
-    LINK_FLAGS "-avoid-version -Wl,-exported_symbols_list -Wl,${CMAKE_CURRENT_SOURCE_DIR}/CIndex.darwin.exports -Wl,-dead_strip -Wl,-seg1addr -Wl,0xE0000000"
+    LINK_FLAGS "-avoid-version -Wl,-exported_symbols_list -Wl,${CMAKE_CURRENT_SOURCE_DIR}/libclang.darwin.exports -Wl,-dead_strip -Wl,-seg1addr -Wl,0xE0000000"
     INSTALL_NAME_DIR "@executable_path/../lib"
     )
 endif()
@@ -47,10 +48,10 @@ if(MSVC)
   # windows.h doesn't compile with /Za
   get_target_property(NON_ANSI_COMPILE_FLAGS CIndex COMPILE_FLAGS)
   string(REPLACE /Za "" NON_ANSI_COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS})
-  set_target_properties(CIndex PROPERTIES COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS})
+  set_target_properties(libclang PROPERTIES COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS})
 endif(MSVC)
 
-set_target_properties(CIndex
+set_target_properties(libclang
   PROPERTIES
   LINKER_LANGUAGE CXX
   DEFINE_SYMBOL _CINDEX_LIB_)
similarity index 93%
rename from tools/CIndex/Makefile
rename to tools/libclang/Makefile
index 391746d4d4fd13b298e0eeb666e005f82c7569f8..a7877bf8e16bf713c64f7e44e9a8f9b38e717480 100644 (file)
@@ -1,4 +1,4 @@
-##===- tools/CIndex/Makefile -------------------------------*- Makefile -*-===##
+##===- tools/libclang/Makefile -----------------------------*- Makefile -*-===##
 # 
 #                     The LLVM Compiler Infrastructure
 #
@@ -8,9 +8,9 @@
 ##===----------------------------------------------------------------------===##
 
 LEVEL = ../../../..
-LIBRARYNAME = CIndex
+LIBRARYNAME = clang
 
-EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/CIndex.exports
+EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/libclang.exports
 
 CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include