summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-05-27 16:57:42 +0000
committerTed Kremenek <kremenek@apple.com>2010-05-27 16:57:42 +0000
commit31729162bcfe8073356c98d046e9838b0935d2e1 (patch)
treeb125a4c18ae68e5e4196e2c4d52d071afaca8979
parent5e6b71ce34512670be9a55e859bbacfdfa8edaaf (diff)
downloadbcm5719-llvm-31729162bcfe8073356c98d046e9838b0935d2e1.tar.gz
bcm5719-llvm-31729162bcfe8073356c98d046e9838b0935d2e1.zip
Remove clang_isFromMainFile(). It doesn't work correctly with CXDiagnostics, and we shouldn't
have an API around that cannot be implemented correctly yet. llvm-svn: 104849
-rw-r--r--clang/include/clang-c/Index.h6
-rw-r--r--clang/tools/libclang/CIndex.cpp10
-rw-r--r--clang/tools/libclang/libclang.darwin.exports1
-rw-r--r--clang/tools/libclang/libclang.exports1
4 files changed, 0 insertions, 18 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h
index 86926bd683b..ef779d622a8 100644
--- a/clang/include/clang-c/Index.h
+++ b/clang/include/clang-c/Index.h
@@ -343,12 +343,6 @@ CINDEX_LINKAGE CXSourceLocation clang_getRangeStart(CXSourceRange range);
CINDEX_LINKAGE CXSourceLocation clang_getRangeEnd(CXSourceRange range);
/**
- * \brief Determine if the source location occurs within the main file
- * of the translation unit (as opposed to an included header).
- */
-CINDEX_LINKAGE unsigned clang_isFromMainFile(CXSourceLocation loc);
-
-/**
* @}
*/
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index a077589c8f7..21396ad1c53 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -1479,16 +1479,6 @@ CXSourceLocation clang_getRangeEnd(CXSourceRange range) {
return Result;
}
-unsigned clang_isFromMainFile(CXSourceLocation loc) {
- SourceLocation Loc = SourceLocation::getFromRawEncoding(loc.int_data);
- if (!loc.ptr_data[0] || Loc.isInvalid())
- return 0;
-
- const SourceManager &SM =
- *static_cast<const SourceManager*>(loc.ptr_data[0]);
- return SM.isFromMainFile(Loc) ? 1 : 0;
-}
-
} // end: extern "C"
//===----------------------------------------------------------------------===//
diff --git a/clang/tools/libclang/libclang.darwin.exports b/clang/tools/libclang/libclang.darwin.exports
index a9f4f0777cd..3ef3b748547 100644
--- a/clang/tools/libclang/libclang.darwin.exports
+++ b/clang/tools/libclang/libclang.darwin.exports
@@ -78,7 +78,6 @@ _clang_getTypeKindSpelling
_clang_isCursorDefinition
_clang_isDeclaration
_clang_isExpression
-_clang_isFromMainFile
_clang_isInvalid
_clang_isPreprocessing
_clang_isReference
diff --git a/clang/tools/libclang/libclang.exports b/clang/tools/libclang/libclang.exports
index b09e6ac56c8..7df674037ba 100644
--- a/clang/tools/libclang/libclang.exports
+++ b/clang/tools/libclang/libclang.exports
@@ -78,7 +78,6 @@ clang_getTypeKindSpelling
clang_isCursorDefinition
clang_isDeclaration
clang_isExpression
-clang_isFromMainFile
clang_isInvalid
clang_isPreprocessing
clang_isReference
OpenPOWER on IntegriCloud