From: Ted Kremenek Date: Wed, 17 Nov 2010 23:24:11 +0000 (+0000) Subject: Make definition of CXTranslationUnitImpl private X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0a90d32523bfe5fa63e11b648686c9699f786d15;p=clang Make definition of CXTranslationUnitImpl private to libclang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119585 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h index 76297f421e..e4edf3b944 100644 --- a/include/clang-c/Index.h +++ b/include/clang-c/Index.h @@ -63,10 +63,7 @@ typedef void *CXIndex; /** * \brief A single translation unit, which resides in an index. */ -typedef struct CXTranslationUnitImpl { - void *TUData; - void *StringPool; -} *CXTranslationUnit; /* A translation unit instance. */ +typedef struct CXTranslationUnitImpl *CXTranslationUnit; /** * \brief Opaque pointer representing client data that will be passed through diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index c69a97c493..6b094122f2 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -14,6 +14,7 @@ #include "CIndexer.h" #include "CXCursor.h" +#include "CXTranslationUnit.h" #include "CXString.h" #include "CXType.h" #include "CXSourceLocation.h" diff --git a/tools/libclang/CIndexCodeCompletion.cpp b/tools/libclang/CIndexCodeCompletion.cpp index 74c3274ad6..06c418dfb9 100644 --- a/tools/libclang/CIndexCodeCompletion.cpp +++ b/tools/libclang/CIndexCodeCompletion.cpp @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "CIndexer.h" +#include "CXTranslationUnit.h" #include "CXString.h" #include "CIndexDiagnostic.h" #include "clang/Basic/SourceManager.h" diff --git a/tools/libclang/CIndexDiagnostic.cpp b/tools/libclang/CIndexDiagnostic.cpp index 31ca6791a6..35acd0da00 100644 --- a/tools/libclang/CIndexDiagnostic.cpp +++ b/tools/libclang/CIndexDiagnostic.cpp @@ -12,6 +12,7 @@ \*===----------------------------------------------------------------------===*/ #include "CIndexDiagnostic.h" #include "CIndexer.h" +#include "CXTranslationUnit.h" #include "CXSourceLocation.h" #include "CXString.h" diff --git a/tools/libclang/CIndexInclusionStack.cpp b/tools/libclang/CIndexInclusionStack.cpp index b93bb6f942..e0f4d42def 100644 --- a/tools/libclang/CIndexInclusionStack.cpp +++ b/tools/libclang/CIndexInclusionStack.cpp @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "CIndexer.h" +#include "CXTranslationUnit.h" #include "CXSourceLocation.h" #include "clang/AST/DeclVisitor.h" #include "clang/Frontend/ASTUnit.h" diff --git a/tools/libclang/CXCursor.cpp b/tools/libclang/CXCursor.cpp index ea9cfdff29..841e297b88 100644 --- a/tools/libclang/CXCursor.cpp +++ b/tools/libclang/CXCursor.cpp @@ -13,6 +13,7 @@ // //===----------------------------------------------------------------------===// +#include "CXTranslationUnit.h" #include "CXCursor.h" #include "CXString.h" #include "clang/Frontend/ASTUnit.h" diff --git a/tools/libclang/CXString.cpp b/tools/libclang/CXString.cpp index a2860a1095..f2a6b091ec 100644 --- a/tools/libclang/CXString.cpp +++ b/tools/libclang/CXString.cpp @@ -14,6 +14,7 @@ //===----------------------------------------------------------------------===// #include "CXString.h" +#include "CXTranslationUnit.h" #include "clang/Frontend/ASTUnit.h" #include "clang-c/Index.h" #include "llvm/ADT/SmallString.h" diff --git a/tools/libclang/CXTranslationUnit.h b/tools/libclang/CXTranslationUnit.h new file mode 100644 index 0000000000..6df85b7d4d --- /dev/null +++ b/tools/libclang/CXTranslationUnit.h @@ -0,0 +1,24 @@ +//===- CXTranslationUnit.h - Routines for manipulating CXTranslationUnits -===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines routines for manipulating CXTranslationUnits. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_CXTRANSLATIONUNIT_H +#define LLVM_CLANG_CXTRANSLATIONUNIT_H + +extern "C" { +struct CXTranslationUnitImpl { + void *TUData; + void *StringPool; +}; +} + +#endif diff --git a/tools/libclang/CXType.cpp b/tools/libclang/CXType.cpp index 90c665882a..a42f009de2 100644 --- a/tools/libclang/CXType.cpp +++ b/tools/libclang/CXType.cpp @@ -12,6 +12,7 @@ //===--------------------------------------------------------------------===// #include "CIndexer.h" +#include "CXTranslationUnit.h" #include "CXCursor.h" #include "CXString.h" #include "CXType.h"