aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang-c/Index.h5
-rw-r--r--tools/libclang/CIndex.cpp1
-rw-r--r--tools/libclang/CIndexCodeCompletion.cpp1
-rw-r--r--tools/libclang/CIndexDiagnostic.cpp1
-rw-r--r--tools/libclang/CIndexInclusionStack.cpp1
-rw-r--r--tools/libclang/CXCursor.cpp1
-rw-r--r--tools/libclang/CXString.cpp1
-rw-r--r--tools/libclang/CXTranslationUnit.h24
-rw-r--r--tools/libclang/CXType.cpp1
9 files changed, 32 insertions, 4 deletions
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"