Bug 1262735 - Change the clang paths in patches added in
bug 1210154. r?ehsan
--- a/build/build-clang/query-selector-visibility.patch
+++ b/build/build-clang/query-selector-visibility.patch
@@ -1,18 +1,18 @@
commit 865b9340996f9f9d04b73b187248737dc6fd845e
Author: Michael Wu <mwu@mozilla.com>
Date: Mon Sep 14 17:47:21 2015 -0400
Add support for querying the visibility of a cursor
-diff --git a/llvm/tools/clang/include/clang-c/Index.h b/llvm/tools/clang/include/clang-c/Index.h
+diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h
index fad9cfa..311bfcb 100644
---- a/llvm/tools/clang/include/clang-c/Index.h
-+++ b/llvm/tools/clang/include/clang-c/Index.h
+--- a/clang/include/clang-c/Index.h
++++ b/clang/include/clang-c/Index.h
@@ -2440,6 +2440,24 @@ enum CXLinkageKind {
CINDEX_LINKAGE enum CXLinkageKind clang_getCursorLinkage(CXCursor cursor);
/**
+ * \brief Describe the visibility of the entity referred to by a cursor.
+ */
+enum CXVisibilityKind {
+ /** \brief This value indicates that no visibility information is available
@@ -28,20 +28,20 @@ index fad9cfa..311bfcb 100644
+};
+
+CINDEX_LINKAGE enum CXVisibilityKind clang_getCursorVisibility(CXCursor cursor);
+
+/**
* \brief Determine the availability of the entity that this cursor refers to,
* taking the current target platform into account.
*
-diff --git a/llvm/tools/clang/tools/libclang/CIndex.cpp b/llvm/tools/clang/tools/libclang/CIndex.cpp
+diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index 8225a6c..9fa18d3 100644
---- a/llvm/tools/clang/tools/libclang/CIndex.cpp
-+++ b/llvm/tools/clang/tools/libclang/CIndex.cpp
+--- a/clang/tools/libclang/CIndex.cpp
++++ b/clang/tools/libclang/CIndex.cpp
@@ -6361,6 +6361,27 @@ CXLinkageKind clang_getCursorLinkage(CXCursor cursor) {
} // end: extern "C"
//===----------------------------------------------------------------------===//
+// Operations for querying visibility of a cursor.
+//===----------------------------------------------------------------------===//
+
+extern "C" {
@@ -60,20 +60,20 @@ index 8225a6c..9fa18d3 100644
+ return CXVisibility_Invalid;
+}
+} // end: extern "C"
+
+//===----------------------------------------------------------------------===//
// Operations for querying language of a cursor.
//===----------------------------------------------------------------------===//
-diff --git a/llvm/tools/clang/tools/libclang/libclang.exports b/llvm/tools/clang/tools/libclang/libclang.exports
+diff --git a/clang/tools/libclang/libclang.exports b/clang/tools/libclang/libclang.exports
index f6a7175..a919a8e 100644
---- a/llvm/tools/clang/tools/libclang/libclang.exports
-+++ b/llvm/tools/clang/tools/libclang/libclang.exports
+--- a/clang/tools/libclang/libclang.exports
++++ b/clang/tools/libclang/libclang.exports
@@ -173,6 +173,7 @@ clang_getCursorSemanticParent
clang_getCursorSpelling
clang_getCursorType
clang_getCursorUSR
+clang_getCursorVisibility
clang_getDeclObjCTypeEncoding
clang_getDefinitionSpellingAndExtent
clang_getDiagnostic
--- a/build/build-clang/return-empty-string-non-mangled.patch
+++ b/build/build-clang/return-empty-string-non-mangled.patch
@@ -1,18 +1,18 @@
commit 009de5ea7a1913f0b4619cf514787bd52af38c28
Author: Michael Wu <mwu@mozilla.com>
Date: Thu Sep 24 11:36:08 2015 -0400
Return an empty string when a symbol isn't mangled
-diff --git a/llvm/tools/clang/tools/libclang/CIndex.cpp b/llvm/tools/clang/tools/libclang/CIndex.cpp
+diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index 9fa18d3..1253832 100644
---- a/llvm/tools/clang/tools/libclang/CIndex.cpp
-+++ b/llvm/tools/clang/tools/libclang/CIndex.cpp
+--- a/clang/tools/libclang/CIndex.cpp
++++ b/clang/tools/libclang/CIndex.cpp
@@ -3891,6 +3891,10 @@ CXString clang_Cursor_getMangling(CXCursor C) {
ASTContext &Ctx = ND->getASTContext();
std::unique_ptr<MangleContext> MC(Ctx.createMangleContext());
+ // Don't mangle if we don't need to.
+ if (!MC->shouldMangleCXXName(ND))
+ return cxstring::createEmpty();
+