summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-12-06 18:55:45 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-12-06 18:55:45 +0000
commit0e282ef86807c2931147c574d1a45b006d45f5c5 (patch)
tree013236b87d9759449dc2916d5aba74723fed7bf3
parent326d998cfa2850f523286789af2fb58480b3fc22 (diff)
downloadbcm5719-llvm-0e282ef86807c2931147c574d1a45b006d45f5c5.tar.gz
bcm5719-llvm-0e282ef86807c2931147c574d1a45b006d45f5c5.zip
[libclang] Rename CXSkippedRanges to CXSourceRangeList to make it more future-proof.
Suggested by Alp Toker. llvm-svn: 196591
-rw-r--r--clang/include/clang-c/Index.h21
-rw-r--r--clang/tools/c-index-test/c-index-test.c4
-rw-r--r--clang/tools/libclang/CIndex.cpp12
-rw-r--r--clang/tools/libclang/libclang.exports2
4 files changed, 19 insertions, 20 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h
index 3ca92d83dce..04c3a652bd1 100644
--- a/clang/include/clang-c/Index.h
+++ b/clang/include/clang-c/Index.h
@@ -599,31 +599,30 @@ CINDEX_LINKAGE CXSourceLocation clang_getRangeStart(CXSourceRange range);
CINDEX_LINKAGE CXSourceLocation clang_getRangeEnd(CXSourceRange range);
/**
- * \brief Identifies an array of ranges that were skipped by the preprocessor.
- *
- * The preprocessor will skip lines when they are surrounded by an
- * if/ifdef/ifndef directive whose condition does not evaluate to true.
+ * \brief Identifies an array of ranges.
*/
typedef struct {
/** \brief The number of ranges in the \c ranges array. */
unsigned count;
/**
- * \brief An array of \c CXSourceRange, where each range starts at the
- * preprocessor directive after the # token, and ends at the end of the
- * corresponding endif.
+ * \brief An array of \c CXSourceRanges.
*/
CXSourceRange *ranges;
-} CXSkippedRanges;
+} CXSourceRangeList;
/**
* \brief Retrieve all ranges that were skipped by the preprocessor.
+ *
+ * The preprocessor will skip lines when they are surrounded by an
+ * if/ifdef/ifndef directive whose condition does not evaluate to true.
*/
-CINDEX_LINKAGE CXSkippedRanges *clang_getSkippedRanges(CXTranslationUnit tu, CXFile file);
+CINDEX_LINKAGE CXSourceRangeList *clang_getSkippedRanges(CXTranslationUnit tu,
+ CXFile file);
/**
- * \brief Destroy the given \c CXSkippedRanges.
+ * \brief Destroy the given \c CXSourceRangeList.
*/
-CINDEX_LINKAGE void clang_disposeSkippedRanges(CXSkippedRanges *skipped);
+CINDEX_LINKAGE void clang_disposeSourceRangeList(CXSourceRangeList *ranges);
/**
* @}
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c
index 39cdcc149ee..9288f92d17d 100644
--- a/clang/tools/c-index-test/c-index-test.c
+++ b/clang/tools/c-index-test/c-index-test.c
@@ -3183,7 +3183,7 @@ int perform_token_annotation(int argc, const char **argv) {
CXSourceLocation startLoc, endLoc;
CXFile file = 0;
CXCursor *cursors = 0;
- CXSkippedRanges *skipped_ranges = 0;
+ CXSourceRangeList *skipped_ranges = 0;
unsigned i;
input += strlen("-test-annotate-tokens=");
@@ -3283,7 +3283,7 @@ int perform_token_annotation(int argc, const char **argv) {
PrintExtent(stdout, start_line, start_column, end_line, end_column);
printf("\n");
}
- clang_disposeSkippedRanges(skipped_ranges);
+ clang_disposeSourceRangeList(skipped_ranges);
for (i = 0; i != num_tokens; ++i) {
const char *kind = "<unknown>";
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index c8bff739356..e7da9620dcf 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -6494,8 +6494,8 @@ void clang_disposeCXTUResourceUsage(CXTUResourceUsage usage) {
delete (MemUsageEntries*) usage.data;
}
-CXSkippedRanges *clang_getSkippedRanges(CXTranslationUnit TU, CXFile file) {
- CXSkippedRanges *skipped = new CXSkippedRanges;
+CXSourceRangeList *clang_getSkippedRanges(CXTranslationUnit TU, CXFile file) {
+ CXSourceRangeList *skipped = new CXSourceRangeList;
skipped->count = 0;
skipped->ranges = 0;
@@ -6528,10 +6528,10 @@ CXSkippedRanges *clang_getSkippedRanges(CXTranslationUnit TU, CXFile file) {
return skipped;
}
-void clang_disposeSkippedRanges(CXSkippedRanges *skipped) {
- if (skipped) {
- delete[] skipped->ranges;
- delete skipped;
+void clang_disposeSourceRangeList(CXSourceRangeList *ranges) {
+ if (ranges) {
+ delete[] ranges->ranges;
+ delete ranges;
}
}
diff --git a/clang/tools/libclang/libclang.exports b/clang/tools/libclang/libclang.exports
index 896228ad3c5..809cf03a10b 100644
--- a/clang/tools/libclang/libclang.exports
+++ b/clang/tools/libclang/libclang.exports
@@ -101,7 +101,7 @@ clang_disposeDiagnosticSet
clang_disposeIndex
clang_disposeOverriddenCursors
clang_disposeCXPlatformAvailability
-clang_disposeSkippedRanges
+clang_disposeSourceRangeList
clang_disposeString
clang_disposeTokens
clang_disposeTranslationUnit
OpenPOWER on IntegriCloud