diff --git a/clang-tools-extra/clangd/unittests/Annotations.h b/clang-tools-extra/clangd/unittests/Annotations.h --- a/clang-tools-extra/clangd/unittests/Annotations.h +++ b/clang-tools-extra/clangd/unittests/Annotations.h @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// A clangd-specific version of llvm/Testing/Support/Annotations.h, replaces +// A clangd-specific version of llvm/Testing/Annotations/Annotations.h, replaces // offsets and offset-based ranges with types from the LSP protocol. //===---------------------------------------------------------------------===// @@ -13,7 +13,7 @@ #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_UNITTESTS_ANNOTATIONS_H #include "Protocol.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" namespace clang { namespace clangd { diff --git a/clang-tools-extra/clangd/unittests/CMakeLists.txt b/clang-tools-extra/clangd/unittests/CMakeLists.txt --- a/clang-tools-extra/clangd/unittests/CMakeLists.txt +++ b/clang-tools-extra/clangd/unittests/CMakeLists.txt @@ -5,7 +5,12 @@ ) if(CLANG_BUILT_STANDALONE) - # LLVMTestingSupport library is needed for clangd tests. + # LLVMTestingSupport and LLVMTestingAnnotations are needed for clangd tests. + if (EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Testing/Annotations + AND NOT TARGET LLVMTestingAnnotations) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/lib/Testing/Annotations + lib/Testing/Annotations) + endif() if (EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Testing/Support AND NOT TARGET LLVMTestingSupport) add_subdirectory(${LLVM_MAIN_SRC_DIR}/lib/Testing/Support @@ -162,6 +167,7 @@ clangDaemon clangdSupport clangTidy + LLVMTestingAnnotations LLVMTestingSupport ) diff --git a/clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp b/clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp --- a/clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp +++ b/clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp @@ -29,7 +29,7 @@ #include "llvm/ADT/StringRef.h" #include "llvm/Support/Error.h" #include "llvm/Support/Path.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "llvm/Testing/Support/Error.h" #include "llvm/Testing/Support/SupportHelpers.h" #include "gmock/gmock.h" diff --git a/clang-tools-extra/clangd/unittests/FindTargetTests.cpp b/clang-tools-extra/clangd/unittests/FindTargetTests.cpp --- a/clang-tools-extra/clangd/unittests/FindTargetTests.cpp +++ b/clang-tools-extra/clangd/unittests/FindTargetTests.cpp @@ -15,7 +15,7 @@ #include "llvm/ADT/StringRef.h" #include "llvm/Support/Casting.h" #include "llvm/Support/raw_ostream.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include diff --git a/clang-tools-extra/clangd/unittests/SourceCodeTests.cpp b/clang-tools-extra/clangd/unittests/SourceCodeTests.cpp --- a/clang-tools-extra/clangd/unittests/SourceCodeTests.cpp +++ b/clang-tools-extra/clangd/unittests/SourceCodeTests.cpp @@ -15,7 +15,7 @@ #include "clang/Basic/TokenKinds.h" #include "clang/Format/Format.h" #include "llvm/Support/Error.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "llvm/Testing/Support/Error.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/clangd/unittests/tweaks/TweakTesting.h b/clang-tools-extra/clangd/unittests/tweaks/TweakTesting.h --- a/clang-tools-extra/clangd/unittests/tweaks/TweakTesting.h +++ b/clang-tools-extra/clangd/unittests/tweaks/TweakTesting.h @@ -13,7 +13,7 @@ #include "index/Index.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include diff --git a/clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp b/clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp --- a/clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp +++ b/clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp @@ -19,7 +19,7 @@ #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Support/ScopedPrinter.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include diff --git a/clang-tools-extra/include-cleaner/unittests/CMakeLists.txt b/clang-tools-extra/include-cleaner/unittests/CMakeLists.txt --- a/clang-tools-extra/include-cleaner/unittests/CMakeLists.txt +++ b/clang-tools-extra/include-cleaner/unittests/CMakeLists.txt @@ -31,6 +31,7 @@ PRIVATE clangIncludeCleaner clangTesting + LLVMTestingAnnotations LLVMTestingSupport ) diff --git a/clang-tools-extra/include-cleaner/unittests/FindHeadersTest.cpp b/clang-tools-extra/include-cleaner/unittests/FindHeadersTest.cpp --- a/clang-tools-extra/include-cleaner/unittests/FindHeadersTest.cpp +++ b/clang-tools-extra/include-cleaner/unittests/FindHeadersTest.cpp @@ -17,7 +17,7 @@ #include "clang/Testing/TestAST.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/Support/raw_ostream.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include diff --git a/clang-tools-extra/include-cleaner/unittests/LocateSymbolTest.cpp b/clang-tools-extra/include-cleaner/unittests/LocateSymbolTest.cpp --- a/clang-tools-extra/include-cleaner/unittests/LocateSymbolTest.cpp +++ b/clang-tools-extra/include-cleaner/unittests/LocateSymbolTest.cpp @@ -15,7 +15,7 @@ #include "clang/Testing/TestAST.h" #include "clang/Tooling/Inclusions/StandardLibrary.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include diff --git a/clang-tools-extra/include-cleaner/unittests/RecordTest.cpp b/clang-tools-extra/include-cleaner/unittests/RecordTest.cpp --- a/clang-tools-extra/include-cleaner/unittests/RecordTest.cpp +++ b/clang-tools-extra/include-cleaner/unittests/RecordTest.cpp @@ -13,7 +13,7 @@ #include "clang/Testing/TestAST.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/Support/raw_ostream.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp b/clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp --- a/clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp +++ b/clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp @@ -15,7 +15,7 @@ #include "llvm/ADT/StringRef.h" #include "llvm/Support/Error.h" #include "llvm/Support/ScopedPrinter.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "gtest/gtest.h" #include #include diff --git a/clang-tools-extra/pseudo/unittests/BracketTest.cpp b/clang-tools-extra/pseudo/unittests/BracketTest.cpp --- a/clang-tools-extra/pseudo/unittests/BracketTest.cpp +++ b/clang-tools-extra/pseudo/unittests/BracketTest.cpp @@ -9,7 +9,7 @@ #include "clang-pseudo/Bracket.h" #include "clang-pseudo/Token.h" #include "clang/Basic/LangOptions.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang-tools-extra/pseudo/unittests/CMakeLists.txt b/clang-tools-extra/pseudo/unittests/CMakeLists.txt --- a/clang-tools-extra/pseudo/unittests/CMakeLists.txt +++ b/clang-tools-extra/pseudo/unittests/CMakeLists.txt @@ -26,5 +26,6 @@ clangPseudo clangPseudoCXX clangPseudoGrammar + LLVMTestingAnnotations LLVMTestingSupport ) diff --git a/clang-tools-extra/unittests/clang-tidy/CMakeLists.txt b/clang-tools-extra/unittests/clang-tidy/CMakeLists.txt --- a/clang-tools-extra/unittests/clang-tidy/CMakeLists.txt +++ b/clang-tools-extra/unittests/clang-tidy/CMakeLists.txt @@ -57,5 +57,6 @@ clangTidyObjCModule clangTidyReadabilityModule clangTidyUtils + LLVMTestingAnnotations LLVMTestingSupport ) diff --git a/clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp b/clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp --- a/clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp +++ b/clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp @@ -3,7 +3,7 @@ #include "ClangTidyDiagnosticConsumer.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/ScopedPrinter.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include diff --git a/clang/docs/tools/clang-formatted-files.txt b/clang/docs/tools/clang-formatted-files.txt --- a/clang/docs/tools/clang-formatted-files.txt +++ b/clang/docs/tools/clang-formatted-files.txt @@ -5536,7 +5536,7 @@ llvm/include/llvm/TableGen/StringToOffsetTable.h llvm/include/llvm/Target/CGPassBuilderOption.h llvm/include/llvm/Target/CodeGenCWrappers.h -llvm/include/llvm/Testing/Support/Annotations.h +llvm/include/llvm/Testing/Annotations/Annotations.h llvm/include/llvm/Testing/Support/SupportHelpers.h llvm/include/llvm/TextAPI/Architecture.h llvm/include/llvm/TextAPI/ArchitectureSet.h @@ -6839,7 +6839,7 @@ llvm/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp llvm/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.h llvm/lib/Target/XCore/TargetInfo/XCoreTargetInfo.cpp -llvm/lib/Testing/Support/Annotations.cpp +llvm/lib/Testing/Annotations/Annotations.cpp llvm/lib/Testing/Support/Error.cpp llvm/lib/Testing/Support/SupportHelpers.cpp llvm/lib/TextAPI/ArchitectureSet.cpp diff --git a/clang/unittests/AST/CMakeLists.txt b/clang/unittests/AST/CMakeLists.txt --- a/clang/unittests/AST/CMakeLists.txt +++ b/clang/unittests/AST/CMakeLists.txt @@ -50,5 +50,6 @@ target_link_libraries(ASTTests PRIVATE clangTesting + LLVMTestingAnnotations LLVMTestingSupport ) diff --git a/clang/unittests/AST/DeclTest.cpp b/clang/unittests/AST/DeclTest.cpp --- a/clang/unittests/AST/DeclTest.cpp +++ b/clang/unittests/AST/DeclTest.cpp @@ -20,7 +20,7 @@ #include "clang/Lex/Lexer.h" #include "clang/Tooling/Tooling.h" #include "llvm/IR/DataLayout.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "gtest/gtest.h" using namespace clang::ast_matchers; diff --git a/clang/unittests/AST/SourceLocationTest.cpp b/clang/unittests/AST/SourceLocationTest.cpp --- a/clang/unittests/AST/SourceLocationTest.cpp +++ b/clang/unittests/AST/SourceLocationTest.cpp @@ -20,7 +20,7 @@ #include "clang/ASTMatchers/ASTMatchFinder.h" #include "clang/ASTMatchers/ASTMatchers.h" #include "clang/Tooling/Tooling.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "gtest/gtest.h" using namespace clang; diff --git a/clang/unittests/Analysis/FlowSensitive/CMakeLists.txt b/clang/unittests/Analysis/FlowSensitive/CMakeLists.txt --- a/clang/unittests/Analysis/FlowSensitive/CMakeLists.txt +++ b/clang/unittests/Analysis/FlowSensitive/CMakeLists.txt @@ -41,5 +41,6 @@ target_link_libraries(ClangAnalysisFlowSensitiveTests PRIVATE clangTesting + LLVMTestingAnnotations LLVMTestingSupport ) diff --git a/clang/unittests/Analysis/FlowSensitive/SignAnalysisTest.cpp b/clang/unittests/Analysis/FlowSensitive/SignAnalysisTest.cpp --- a/clang/unittests/Analysis/FlowSensitive/SignAnalysisTest.cpp +++ b/clang/unittests/Analysis/FlowSensitive/SignAnalysisTest.cpp @@ -21,7 +21,7 @@ #include "clang/Analysis/FlowSensitive/DataflowAnalysis.h" #include "clang/Analysis/FlowSensitive/NoopLattice.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "llvm/Testing/Support/Error.h" #include "gtest/gtest.h" #include diff --git a/clang/unittests/Analysis/FlowSensitive/SingleVarConstantPropagationTest.cpp b/clang/unittests/Analysis/FlowSensitive/SingleVarConstantPropagationTest.cpp --- a/clang/unittests/Analysis/FlowSensitive/SingleVarConstantPropagationTest.cpp +++ b/clang/unittests/Analysis/FlowSensitive/SingleVarConstantPropagationTest.cpp @@ -28,7 +28,7 @@ #include "llvm/ADT/Twine.h" #include "llvm/Support/Error.h" #include "llvm/Testing/ADT/StringMapEntry.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "llvm/Testing/Support/Error.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang/unittests/Analysis/FlowSensitive/TestingSupport.h b/clang/unittests/Analysis/FlowSensitive/TestingSupport.h --- a/clang/unittests/Analysis/FlowSensitive/TestingSupport.h +++ b/clang/unittests/Analysis/FlowSensitive/TestingSupport.h @@ -43,7 +43,7 @@ #include "llvm/ADT/StringRef.h" #include "llvm/Support/Errc.h" #include "llvm/Support/Error.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" namespace clang { namespace dataflow { diff --git a/clang/unittests/Analysis/FlowSensitive/TestingSupport.cpp b/clang/unittests/Analysis/FlowSensitive/TestingSupport.cpp --- a/clang/unittests/Analysis/FlowSensitive/TestingSupport.cpp +++ b/clang/unittests/Analysis/FlowSensitive/TestingSupport.cpp @@ -13,7 +13,7 @@ #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSet.h" #include "llvm/Support/Error.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include #include #include diff --git a/clang/unittests/Analysis/FlowSensitive/TransferBranchTest.cpp b/clang/unittests/Analysis/FlowSensitive/TransferBranchTest.cpp --- a/clang/unittests/Analysis/FlowSensitive/TransferBranchTest.cpp +++ b/clang/unittests/Analysis/FlowSensitive/TransferBranchTest.cpp @@ -16,7 +16,7 @@ #include "clang/Tooling/Tooling.h" #include "llvm/ADT/Optional.h" #include "llvm/Support/Error.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "llvm/Testing/Support/Error.h" #include "gtest/gtest.h" diff --git a/clang/unittests/Sema/CMakeLists.txt b/clang/unittests/Sema/CMakeLists.txt --- a/clang/unittests/Sema/CMakeLists.txt +++ b/clang/unittests/Sema/CMakeLists.txt @@ -25,5 +25,6 @@ target_link_libraries(SemaTests PRIVATE clangTesting + LLVMTestingAnnotations LLVMTestingSupport ) diff --git a/clang/unittests/Sema/CodeCompleteTest.cpp b/clang/unittests/Sema/CodeCompleteTest.cpp --- a/clang/unittests/Sema/CodeCompleteTest.cpp +++ b/clang/unittests/Sema/CodeCompleteTest.cpp @@ -13,7 +13,7 @@ #include "clang/Sema/Sema.h" #include "clang/Sema/SemaDiagnostic.h" #include "clang/Tooling/Tooling.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include diff --git a/clang/unittests/Tooling/CMakeLists.txt b/clang/unittests/Tooling/CMakeLists.txt --- a/clang/unittests/Tooling/CMakeLists.txt +++ b/clang/unittests/Tooling/CMakeLists.txt @@ -90,6 +90,7 @@ target_link_libraries(ToolingTests PRIVATE + LLVMTestingAnnotations LLVMTestingSupport clangTesting ) diff --git a/clang/unittests/Tooling/SourceCodeTest.cpp b/clang/unittests/Tooling/SourceCodeTest.cpp --- a/clang/unittests/Tooling/SourceCodeTest.cpp +++ b/clang/unittests/Tooling/SourceCodeTest.cpp @@ -11,7 +11,7 @@ #include "clang/Basic/Diagnostic.h" #include "clang/Basic/SourceLocation.h" #include "clang/Lex/Lexer.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "llvm/Testing/Support/Error.h" #include "llvm/Testing/Support/SupportHelpers.h" #include diff --git a/clang/unittests/Tooling/Syntax/CMakeLists.txt b/clang/unittests/Tooling/Syntax/CMakeLists.txt --- a/clang/unittests/Tooling/Syntax/CMakeLists.txt +++ b/clang/unittests/Tooling/Syntax/CMakeLists.txt @@ -26,5 +26,6 @@ target_link_libraries(SyntaxTests PRIVATE clangTesting + LLVMTestingAnnotations LLVMTestingSupport ) diff --git a/clang/unittests/Tooling/Syntax/TokensTest.cpp b/clang/unittests/Tooling/Syntax/TokensTest.cpp --- a/clang/unittests/Tooling/Syntax/TokensTest.cpp +++ b/clang/unittests/Tooling/Syntax/TokensTest.cpp @@ -37,7 +37,7 @@ #include "llvm/Support/VirtualFileSystem.h" #include "llvm/Support/raw_os_ostream.h" #include "llvm/Support/raw_ostream.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "llvm/Testing/Support/SupportHelpers.h" #include #include diff --git a/clang/unittests/Tooling/Syntax/TreeTestBase.h b/clang/unittests/Tooling/Syntax/TreeTestBase.h --- a/clang/unittests/Tooling/Syntax/TreeTestBase.h +++ b/clang/unittests/Tooling/Syntax/TreeTestBase.h @@ -22,7 +22,7 @@ #include "clang/Tooling/Syntax/Tree.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/ScopedPrinter.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/clang/unittests/Tooling/Syntax/TreeTestBase.cpp b/clang/unittests/Tooling/Syntax/TreeTestBase.cpp --- a/clang/unittests/Tooling/Syntax/TreeTestBase.cpp +++ b/clang/unittests/Tooling/Syntax/TreeTestBase.cpp @@ -28,7 +28,7 @@ #include "llvm/ADT/StringRef.h" #include "llvm/Support/Casting.h" #include "llvm/Support/Error.h" -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "gtest/gtest.h" using namespace clang; diff --git a/llvm/include/llvm/Testing/Support/Annotations.h b/llvm/include/llvm/Testing/Annotations/Annotations.h rename from llvm/include/llvm/Testing/Support/Annotations.h rename to llvm/include/llvm/Testing/Annotations/Annotations.h diff --git a/llvm/lib/Testing/Support/Annotations.cpp b/llvm/lib/Testing/Annotations/Annotations.cpp rename from llvm/lib/Testing/Support/Annotations.cpp rename to llvm/lib/Testing/Annotations/Annotations.cpp --- a/llvm/lib/Testing/Support/Annotations.cpp +++ b/llvm/lib/Testing/Annotations/Annotations.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/FormatVariadic.h" diff --git a/llvm/lib/Testing/Annotations/CMakeLists.txt b/llvm/lib/Testing/Annotations/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/llvm/lib/Testing/Annotations/CMakeLists.txt @@ -0,0 +1,15 @@ +# Do not build unittest libraries automatically, they will be pulled in +# by unittests if these are built. +set(EXCLUDE_FROM_ALL ON) + +add_llvm_library(LLVMTestingAnnotations + Annotations.cpp + + BUILDTREE_ONLY + + ADDITIONAL_HEADER_DIRS + ${LLVM_MAIN_INCLUDE_DIR}/llvm/Testing/Support + + LINK_COMPONENTS + Support + ) diff --git a/llvm/lib/Testing/CMakeLists.txt b/llvm/lib/Testing/CMakeLists.txt --- a/llvm/lib/Testing/CMakeLists.txt +++ b/llvm/lib/Testing/CMakeLists.txt @@ -1 +1,2 @@ +add_subdirectory(Annotations) add_subdirectory(Support) diff --git a/llvm/lib/Testing/Support/CMakeLists.txt b/llvm/lib/Testing/Support/CMakeLists.txt --- a/llvm/lib/Testing/Support/CMakeLists.txt +++ b/llvm/lib/Testing/Support/CMakeLists.txt @@ -3,7 +3,6 @@ set(EXCLUDE_FROM_ALL ON) add_llvm_library(LLVMTestingSupport - Annotations.cpp Error.cpp SupportHelpers.cpp diff --git a/llvm/unittests/Support/CMakeLists.txt b/llvm/unittests/Support/CMakeLists.txt --- a/llvm/unittests/Support/CMakeLists.txt +++ b/llvm/unittests/Support/CMakeLists.txt @@ -8,7 +8,6 @@ AlignmentTest.cpp AlignOfTest.cpp AllocatorTest.cpp - AnnotationsTest.cpp ARMAttributeParser.cpp ArrayRecyclerTest.cpp Base64Test.cpp diff --git a/llvm/unittests/Support/AnnotationsTest.cpp b/llvm/unittests/Testing/Annotations/AnnotationsTest.cpp rename from llvm/unittests/Support/AnnotationsTest.cpp rename to llvm/unittests/Testing/Annotations/AnnotationsTest.cpp --- a/llvm/unittests/Support/AnnotationsTest.cpp +++ b/llvm/unittests/Testing/Annotations/AnnotationsTest.cpp @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/llvm/unittests/Testing/Annotations/CMakeLists.txt b/llvm/unittests/Testing/Annotations/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/llvm/unittests/Testing/Annotations/CMakeLists.txt @@ -0,0 +1,10 @@ +set(LLVM_LINK_COMPONENTS + Support + TestingAnnotations + ) + +add_llvm_unittest(TestingAnnotationTests + AnnotationsTest.cpp + ) + +target_link_libraries(TestingAnnotationTests PRIVATE LLVMTestingAnnotations) diff --git a/llvm/unittests/Testing/CMakeLists.txt b/llvm/unittests/Testing/CMakeLists.txt --- a/llvm/unittests/Testing/CMakeLists.txt +++ b/llvm/unittests/Testing/CMakeLists.txt @@ -1,2 +1,3 @@ add_subdirectory(ADT) +add_subdirectory(Annotations) add_subdirectory(Support) diff --git a/utils/bazel/llvm-project-overlay/clang/unittests/BUILD.bazel b/utils/bazel/llvm-project-overlay/clang/unittests/BUILD.bazel --- a/utils/bazel/llvm-project-overlay/clang/unittests/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/clang/unittests/BUILD.bazel @@ -29,6 +29,7 @@ "//clang:tooling", "//llvm:Core", "//llvm:Support", + "//llvm:TestingAnnotations", "//llvm:TestingSupport", "//third-party/unittest:gmock", "//third-party/unittest:gtest", @@ -136,6 +137,7 @@ "//clang:tooling", "//llvm:Support", "//llvm:TestingADT", + "//llvm:TestingAnnotations", "//llvm:TestingSupport", "//third-party/unittest:gmock", "//third-party/unittest:gtest", @@ -342,6 +344,7 @@ "//clang:parse", "//clang:sema", "//clang:tooling", + "//llvm:TestingAnnotations", "//llvm:TestingSupport", "//third-party/unittest:gmock", "//third-party/unittest:gtest", @@ -420,6 +423,7 @@ "//clang:tooling_refactoring", "//clang:transformer", "//llvm:Support", + "//llvm:TestingAnnotations", "//llvm:TestingSupport", "//third-party/unittest:gmock", "//third-party/unittest:gtest", @@ -495,6 +499,7 @@ "//clang:tooling_core", "//clang:tooling_syntax", "//llvm:Support", + "//llvm:TestingAnnotations", "//llvm:TestingSupport", "//third-party/unittest:gmock", "//third-party/unittest:gtest", diff --git a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel --- a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel @@ -4516,9 +4516,7 @@ "lib/Testing/Support/*.cpp", "lib/Testing/Support/*.h", ]), - hdrs = glob([ - "include/llvm/Testing/Support/*.h", - ]), + hdrs = glob(["include/llvm/Testing/Support/*.h"]), copts = llvm_copts, deps = [ ":Support", @@ -4528,6 +4526,15 @@ ], ) +cc_library( + name = "TestingAnnotations", + testonly = True, + srcs = ["lib/Testing/Annotations/Annotations.cpp"], + hdrs = ["include/llvm/Testing/Annotations/Annotations.h"], + copts = llvm_copts, + deps = [":Support"], +) + ################################################################################ # Begin testonly binary utilities