* CXEntity Operations.
*/
CINDEX_LINKAGE const char *clang_getDeclarationName(CXEntity);
-CINDEX_LINKAGE const char *clang_getURI(CXEntity);
-CINDEX_LINKAGE CXEntity clang_getEntity(const char *URI);
+CINDEX_LINKAGE const char *clang_getUSR(CXEntity);
+CINDEX_LINKAGE CXEntity clang_getEntity(const char *USR);
/*
* CXDecl Operations.
*/
DVisit.Visit(static_cast<Decl *>(Dcl));
}
-// Some notes on CXEntity:
-//
-// - Since the 'ordinary' namespace includes functions, data, typedefs,
-// ObjC interfaces, thecurrent algorithm is a bit naive (resulting in one
-// entity for 2 different types). For example:
-//
-// module1.m: @interface Foo @end Foo *x;
-// module2.m: void Foo(int);
-//
-// - Since the unique name spans translation units, static data/functions
-// within a CXTranslationUnit are *not* currently represented by entities.
-// As a result, there will be no entity for the following:
-//
-// module.m: static void Foo() { }
-//
-
-
-const char *clang_getDeclarationName(CXEntity) {
- return "";
-}
-
-const char *clang_getURI(CXEntity) {
- return "";
-}
-
-CXEntity clang_getEntity(const char *URI) {
- return 0;
-}
-
//
// CXDecl Operations.
//
_clang_getNullCursor
_clang_getNumCompletionChunks
_clang_getTranslationUnitSpelling
-_clang_getURI
+_clang_getUSR
_clang_isDeclaration
_clang_isDefinition
_clang_isInvalid
--- /dev/null
+//===- CIndexUSR.cpp - Clang-C Source Indexing Library --------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements the generation and use of USRs from CXEntities.
+//
+//===----------------------------------------------------------------------===//
+
+#include "CIndexer.h"
+
+extern "C" {
+
+// Some notes on CXEntity:
+//
+// - Since the 'ordinary' namespace includes functions, data, typedefs,
+// ObjC interfaces, thecurrent algorithm is a bit naive (resulting in one
+// entity for 2 different types). For example:
+//
+// module1.m: @interface Foo @end Foo *x;
+// module2.m: void Foo(int);
+//
+// - Since the unique name spans translation units, static data/functions
+// within a CXTranslationUnit are *not* currently represented by entities.
+// As a result, there will be no entity for the following:
+//
+// module.m: static void Foo() { }
+//
+
+const char *clang_getDeclarationName(CXEntity) {
+ return "";
+}
+
+const char *clang_getUSR(CXEntity) {
+ return "";
+}
+
+CXEntity clang_getEntity(const char *URI) {
+ return 0;
+}
+
+} // end extern "C"
add_clang_library(CIndex
CIndex.cpp
+ CIndexCodeCompletion.cpp
+ CIndexUSRs.cpp
CIndexer.cpp
- CIndexCodeCompletion)
+)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# FIXME: Deal with LLVM_SUBMIT_VERSION?