[libclang] Make MakeCXTranslationUnit usable outside CIndex.cpp.

llvm-svn: 141769
This commit is contained in:
Argyrios Kyrtzidis 2011-10-12 07:07:33 +00:00
parent fd53aaf7e7
commit 769c7bcd9a
2 changed files with 11 additions and 1 deletions

View File

@ -51,8 +51,9 @@
using namespace clang;
using namespace clang::cxcursor;
using namespace clang::cxstring;
using namespace clang::cxtu;
static CXTranslationUnit MakeCXTranslationUnit(ASTUnit *TU) {
CXTranslationUnit cxtu::MakeCXTranslationUnit(ASTUnit *TU) {
if (!TU)
return 0;
CXTranslationUnit D = new CXTranslationUnitImpl();

View File

@ -21,4 +21,13 @@ struct CXTranslationUnitImpl {
};
}
namespace clang {
class ASTUnit;
namespace cxtu {
CXTranslationUnitImpl *MakeCXTranslationUnit(ASTUnit *TU);
}} // end namespace clang::cxtu
#endif