diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index b853d74bf539..ae797573a21d 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -329,7 +329,7 @@ CINDEX_LINKAGE time_t clang_getFileTime(CXFile SFile); * in a specified translation unit. */ CINDEX_LINKAGE CXDecl clang_getDeclaration(CXEntity, CXTranslationUnit); -CINDEX_LINKAGE const char *clang_getUSR(CXEntity); +CINDEX_LINKAGE CXString clang_getUSR(CXEntity); /* * CXDecl Operations. */ diff --git a/clang/tools/CIndex/CIndexUSRs.cpp b/clang/tools/CIndex/CIndexUSRs.cpp index e53c0c66f179..e0ee3acd30ca 100644 --- a/clang/tools/CIndex/CIndexUSRs.cpp +++ b/clang/tools/CIndex/CIndexUSRs.cpp @@ -74,8 +74,8 @@ CXEntity clang_getEntityFromDecl(CXIndex CIdx, CXDecl CE) { return NullCXEntity(); } -const char *clang_getUSR(CXEntity) { - return ""; +CXString clang_getUSR(CXEntity) { + return CIndexer::createCXString(""); } } // end extern "C"