aboutsummaryrefslogtreecommitdiff
path: root/include/clang-c
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-11-16 08:15:36 +0000
committerTed Kremenek <kremenek@apple.com>2010-11-16 08:15:36 +0000
commita60ed47da13393796d8552b9fdca12abbb3eea42 (patch)
treec3c00a6e1b51902b39446d3799fc81ae47ca0a78 /include/clang-c
parent64ccf2480609f4b5c27b31f6beaa157e6ec4f065 (diff)
Change CXTranslationUnit to not directly cast to an ASTUnit*,
but to wrap both an ASTUnit and a "string pool" that will be used for fast USR generation. This requires a bunch of mechanical changes, as there was a ton of code that assumed that CXTranslationUnit and ASTUnit* were the same. Along with this change, introduce CXStringBuf, which provides an llvm::SmallVector<char> backing for repeatedly generating CXStrings without a huge amount of malloc() traffic. This requires making some changes to the representation of CXString by renaming a few fields (but keeping the size of the object the same). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119337 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang-c')
-rw-r--r--include/clang-c/Index.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h
index c8af3491cd..76297f421e 100644
--- a/include/clang-c/Index.h
+++ b/include/clang-c/Index.h
@@ -63,7 +63,10 @@ typedef void *CXIndex;
/**
* \brief A single translation unit, which resides in an index.
*/
-typedef void *CXTranslationUnit; /* A translation unit instance. */
+typedef struct CXTranslationUnitImpl {
+ void *TUData;
+ void *StringPool;
+} *CXTranslationUnit; /* A translation unit instance. */
/**
* \brief Opaque pointer representing client data that will be passed through
@@ -133,7 +136,7 @@ enum CXAvailabilityKind {
* with the string data, call \c clang_disposeString() to free the string.
*/
typedef struct {
- const char *Spelling;
+ void *data;
unsigned private_flags;
} CXString;