Skip to content

Commit e5974ca

Browse files
committed
Merge branch 'main' into pr-riscv-vlopt-cleanup-2
2 parents f53a0c3 + e93181b commit e5974ca

File tree

661 files changed

+8820
-5346
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

661 files changed

+8820
-5346
lines changed

bolt/lib/Core/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ add_llvm_library(LLVMBOLTCore
3535
ParallelUtilities.cpp
3636
Relocation.cpp
3737

38+
NO_EXPORT
3839
DISABLE_LLVM_LINK_LLVM_DYLIB
3940
LINK_LIBS
4041
${LLVM_PTHREAD_LIB}

bolt/lib/Passes/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ add_llvm_library(LLVMBOLTPasses
4646
VeneerElimination.cpp
4747
RetpolineInsertion.cpp
4848

49+
NO_EXPORT
4950
DISABLE_LLVM_LINK_LLVM_DYLIB
5051

5152
LINK_LIBS

bolt/lib/Profile/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ add_llvm_library(LLVMBOLTProfile
77
YAMLProfileReader.cpp
88
YAMLProfileWriter.cpp
99

10+
NO_EXPORT
1011
DISABLE_LLVM_LINK_LLVM_DYLIB
1112

1213
LINK_COMPONENTS

bolt/lib/Rewrite/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ add_llvm_library(LLVMBOLTRewrite
2525
RewriteInstance.cpp
2626
SDTRewriter.cpp
2727

28+
NO_EXPORT
2829
DISABLE_LLVM_LINK_LLVM_DYLIB
2930

3031
LINK_LIBS

bolt/lib/RuntimeLibs/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ add_llvm_library(LLVMBOLTRuntimeLibs
1111
HugifyRuntimeLibrary.cpp
1212
InstrumentationRuntimeLibrary.cpp
1313

14+
NO_EXPORT
1415
DISABLE_LLVM_LINK_LLVM_DYLIB
1516
)
1617

bolt/lib/Target/AArch64/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ endif()
1919
add_llvm_library(LLVMBOLTTargetAArch64
2020
AArch64MCPlusBuilder.cpp
2121

22+
NO_EXPORT
2223
DISABLE_LLVM_LINK_LLVM_DYLIB
2324

2425
DEPENDS

bolt/lib/Target/RISCV/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ endif()
2020
add_llvm_library(LLVMBOLTTargetRISCV
2121
RISCVMCPlusBuilder.cpp
2222

23+
NO_EXPORT
2324
DISABLE_LLVM_LINK_LLVM_DYLIB
2425

2526
DEPENDS

bolt/lib/Target/X86/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ add_llvm_library(LLVMBOLTTargetX86
2121
X86MCPlusBuilder.cpp
2222
X86MCSymbolizer.cpp
2323

24+
NO_EXPORT
2425
DISABLE_LLVM_LINK_LLVM_DYLIB
2526

2627
DEPENDS

bolt/lib/Utils/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ add_llvm_library(LLVMBOLTUtils
2929
CommandLineOpts.cpp
3030
Utils.cpp
3131
${version_inc}
32+
33+
NO_EXPORT
3234
DISABLE_LLVM_LINK_LLVM_DYLIB
3335

3436
LINK_LIBS

clang-tools-extra/clang-tidy/bugprone/UnusedLocalNonTrivialVariableCheck.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ static constexpr StringRef DefaultIncludeTypeRegex =
2929

3030
AST_MATCHER(VarDecl, isLocalVarDecl) { return Node.isLocalVarDecl(); }
3131
AST_MATCHER(VarDecl, isReferenced) { return Node.isReferenced(); }
32+
AST_MATCHER_P(VarDecl, explicitMarkUnused, LangOptions, LangOpts) {
33+
// Implementations should not emit a warning that a name-independent
34+
// declaration is used or unused.
35+
return Node.hasAttr<UnusedAttr>() ||
36+
(LangOpts.CPlusPlus26 && Node.isPlaceholderVar(LangOpts));
37+
}
3238
AST_MATCHER(Type, isReferenceType) { return Node.isReferenceType(); }
3339
AST_MATCHER(QualType, isTrivial) {
3440
return Node.isTrivialType(Finder->getASTContext()) ||
@@ -60,7 +66,7 @@ void UnusedLocalNonTrivialVariableCheck::registerMatchers(MatchFinder *Finder) {
6066
varDecl(isLocalVarDecl(), unless(isReferenced()),
6167
unless(isExceptionVariable()), hasLocalStorage(), isDefinition(),
6268
unless(hasType(isReferenceType())), unless(hasType(isTrivial())),
63-
unless(hasAttr(attr::Kind::Unused)),
69+
unless(explicitMarkUnused(getLangOpts())),
6470
hasType(hasUnqualifiedDesugaredType(
6571
anyOf(recordType(hasDeclaration(namedDecl(
6672
matchesAnyListedName(IncludeTypes),

0 commit comments

Comments
 (0)