[llvm-branch-commits] [cfe-branch] r105026 - in /cfe/branches/Apple/whitney: include/clang-c/Index.h tools/libclang/CIndex.cpp tools/libclang/libclang.darwin.exports tools/libclang/libclang.exports

Daniel Dunbar daniel at zuster.org
Fri May 28 16:06:12 PDT 2010


Author: ddunbar
Date: Fri May 28 18:06:11 2010
New Revision: 105026

URL: http://llvm.org/viewvc/llvm-project?rev=105026&view=rev
Log:
Merge r104849:
--
Author: Ted Kremenek <kremenek at apple.com>
Date:   Thu May 27 16:57:42 2010 +0000

    Remove clang_isFromMainFile().  It doesn't work correctly with CXDiagnostics, and we shouldn't
    have an API around that cannot be implemented correctly yet.

Modified:
    cfe/branches/Apple/whitney/include/clang-c/Index.h
    cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp
    cfe/branches/Apple/whitney/tools/libclang/libclang.darwin.exports
    cfe/branches/Apple/whitney/tools/libclang/libclang.exports

Modified: cfe/branches/Apple/whitney/include/clang-c/Index.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/include/clang-c/Index.h?rev=105026&r1=105025&r2=105026&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/include/clang-c/Index.h (original)
+++ cfe/branches/Apple/whitney/include/clang-c/Index.h Fri May 28 18:06:11 2010
@@ -343,12 +343,6 @@
 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);
-
-/**
  * @}
  */
 

Modified: cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp?rev=105026&r1=105025&r2=105026&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp (original)
+++ cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp Fri May 28 18:06:11 2010
@@ -1479,16 +1479,6 @@
   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"
 
 //===----------------------------------------------------------------------===//

Modified: cfe/branches/Apple/whitney/tools/libclang/libclang.darwin.exports
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/tools/libclang/libclang.darwin.exports?rev=105026&r1=105025&r2=105026&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/tools/libclang/libclang.darwin.exports (original)
+++ cfe/branches/Apple/whitney/tools/libclang/libclang.darwin.exports Fri May 28 18:06:11 2010
@@ -78,7 +78,6 @@
 _clang_isCursorDefinition
 _clang_isDeclaration
 _clang_isExpression
-_clang_isFromMainFile
 _clang_isInvalid
 _clang_isPreprocessing
 _clang_isReference

Modified: cfe/branches/Apple/whitney/tools/libclang/libclang.exports
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/tools/libclang/libclang.exports?rev=105026&r1=105025&r2=105026&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/tools/libclang/libclang.exports (original)
+++ cfe/branches/Apple/whitney/tools/libclang/libclang.exports Fri May 28 18:06:11 2010
@@ -78,7 +78,6 @@
 clang_isCursorDefinition
 clang_isDeclaration
 clang_isExpression
-clang_isFromMainFile
 clang_isInvalid
 clang_isPreprocessing
 clang_isReference





More information about the llvm-branch-commits mailing list