llvm-toolchain/debian/patches/gcc-7.1-workaround.diff
2017-08-24 21:04:42 +00:00

80 lines
4.1 KiB
Diff

Index: llvm-toolchain-snapshot_6.0~svn311700/clang/include/clang/AST/DeclObjC.h
===================================================================
--- llvm-toolchain-snapshot_6.0~svn311700.orig/clang/include/clang/AST/DeclObjC.h (revision 311595)
+++ llvm-toolchain-snapshot_6.0~svn311700/clang/include/clang/AST/DeclObjC.h (working copy)
@@ -413,12 +413,12 @@
/// Determines the family of this method.
ObjCMethodFamily getMethodFamily() const;
- bool isInstanceMethod() const { return IsInstance; }
+ bool isInstanceMethod() const LLVM_ATTRIBUTE_USED { return IsInstance; }
void setInstanceMethod(bool isInst) { IsInstance = isInst; }
bool isVariadic() const { return IsVariadic; }
void setVariadic(bool isVar) { IsVariadic = isVar; }
- bool isClassMethod() const { return !IsInstance; }
+ bool isClassMethod() const LLVM_ATTRIBUTE_USED { return !IsInstance; }
bool isPropertyAccessor() const { return IsPropertyAccessor; }
void setPropertyAccessor(bool isAccessor) { IsPropertyAccessor = isAccessor; }
@@ -832,8 +832,8 @@
(OBJC_PR_retain | OBJC_PR_strong | OBJC_PR_copy));
}
- bool isInstanceProperty() const { return !isClassProperty(); }
- bool isClassProperty() const { return PropertyAttributes & OBJC_PR_class; }
+ bool isInstanceProperty() const LLVM_ATTRIBUTE_USED { return !isClassProperty(); }
+ bool isClassProperty() const LLVM_ATTRIBUTE_USED { return PropertyAttributes & OBJC_PR_class; }
ObjCPropertyQueryKind getQueryKind() const {
return isClassProperty() ? ObjCPropertyQueryKind::OBJC_PR_query_class :
ObjCPropertyQueryKind::OBJC_PR_query_instance;
@@ -1562,7 +1562,7 @@
/// \brief Test whether the given category is visible.
///
/// Used in the \c visible_categories_iterator.
- static bool isVisibleCategory(ObjCCategoryDecl *Cat);
+ static bool isVisibleCategory(ObjCCategoryDecl *Cat) LLVM_ATTRIBUTE_USED;
public:
/// \brief Iterator that walks over the list of categories and extensions
@@ -1598,7 +1598,7 @@
/// \brief Test whether the given category... is a category.
///
/// Used in the \c known_categories_iterator.
- static bool isKnownCategory(ObjCCategoryDecl *) { return true; }
+ static bool isKnownCategory(ObjCCategoryDecl *) LLVM_ATTRIBUTE_USED { return true; }
public:
/// \brief Iterator that walks over all of the known categories and
@@ -1632,7 +1632,7 @@
/// \brief Test whether the given category is a visible extension.
///
/// Used in the \c visible_extensions_iterator.
- static bool isVisibleExtension(ObjCCategoryDecl *Cat);
+ static bool isVisibleExtension(ObjCCategoryDecl *Cat) LLVM_ATTRIBUTE_USED;
public:
/// \brief Iterator that walks over all of the visible extensions, skipping
@@ -1668,7 +1668,7 @@
/// \brief Test whether the given category is an extension.
///
/// Used in the \c known_extensions_iterator.
- static bool isKnownExtension(ObjCCategoryDecl *Cat);
+ static bool isKnownExtension(ObjCCategoryDecl *Cat) LLVM_ATTRIBUTE_USED;
public:
/// \brief Iterator that walks over all of the known extensions.
Index: llvm-toolchain-snapshot_6.0~svn311700/clang/include/clang/ASTMatchers/ASTMatchersMacros.h
===================================================================
--- llvm-toolchain-snapshot_6.0~svn311700.orig/clang/include/clang/ASTMatchers/ASTMatchersMacros.h (revision 311595)
+++ llvm-toolchain-snapshot_6.0~svn311700/clang/include/clang/ASTMatchers/ASTMatchersMacros.h (working copy)
@@ -54,7 +54,7 @@
/// defines a zero parameter function named DefineMatcher() that returns a
/// ReturnType object.
#define AST_MATCHER_FUNCTION(ReturnType, DefineMatcher) \
- inline ReturnType DefineMatcher##_getInstance(); \
+ inline ReturnType DefineMatcher##_getInstance() LLVM_ATTRIBUTE_USED; \
inline ReturnType DefineMatcher() { \
return ::clang::ast_matchers::internal::MemoizedMatcher< \
ReturnType, DefineMatcher##_getInstance>::getInstance(); \