diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-05-04 16:12:48 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-05-04 16:12:48 +0000 |
commit | 8aaf5818a64e9f7687798852af5945b053c68a54 (patch) | |
tree | d6a70c3518b8dea8be7062438d7e8676820ed17f /tools/c-index-test | |
parent | 71438373cd57f0d5d8c93bb5cf690844a0fbc9d0 (diff) | |
download | FreeBSD-src-8aaf5818a64e9f7687798852af5945b053c68a54.zip FreeBSD-src-8aaf5818a64e9f7687798852af5945b053c68a54.tar.gz |
Update clang to r103004.
Diffstat (limited to 'tools/c-index-test')
-rw-r--r-- | tools/c-index-test/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tools/c-index-test/Makefile | 3 | ||||
-rw-r--r-- | tools/c-index-test/c-index-test.c | 9 |
3 files changed, 7 insertions, 7 deletions
diff --git a/tools/c-index-test/CMakeLists.txt b/tools/c-index-test/CMakeLists.txt index f0a34a5..d965fd2 100644 --- a/tools/c-index-test/CMakeLists.txt +++ b/tools/c-index-test/CMakeLists.txt @@ -1,7 +1,7 @@ set(LLVM_NO_RTTI 1) set( LLVM_USED_LIBS - CIndex + libclang clangIndex clangFrontend clangDriver diff --git a/tools/c-index-test/Makefile b/tools/c-index-test/Makefile index e9ba174..24fed16 100644 --- a/tools/c-index-test/Makefile +++ b/tools/c-index-test/Makefile @@ -10,7 +10,6 @@ LEVEL = ../../../.. TOOLNAME = c-index-test CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include -NO_INSTALL = 1 # No plugins, optimize startup time. TOOL_NO_EXPORTS = 1 @@ -18,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 diff --git a/tools/c-index-test/c-index-test.c b/tools/c-index-test/c-index-test.c index d7f3483..4941816 100644 --- a/tools/c-index-test/c-index-test.c +++ b/tools/c-index-test/c-index-test.c @@ -372,12 +372,13 @@ enum CXChildVisitResult USRVisitor(CXCursor C, CXCursor parent, VisitorData *Data = (VisitorData *)ClientData; if (!Data->Filter || (C.kind == *(enum CXCursorKind *)Data->Filter)) { CXString USR = clang_getCursorUSR(C); - if (!clang_getCString(USR)) { + const char *cstr = clang_getCString(USR); + if (!cstr || cstr[0] == '\0') { clang_disposeString(USR); - return CXChildVisit_Continue; + return CXChildVisit_Recurse; } - printf("// %s: %s %s", FileCheckPrefix, GetCursorSource(C), - clang_getCString(USR)); + printf("// %s: %s %s", FileCheckPrefix, GetCursorSource(C), cstr); + PrintCursorExtent(C); printf("\n"); clang_disposeString(USR); |