<commit_before>set(LLVM_LINK_COMPONENTS
  Support
  )

add_llvm_unittest(SupportTests
  AlignOfTest.cpp
  AllocatorTest.cpp
  ARMAttributeParser.cpp
  ArrayRecyclerTest.cpp
  BinaryStreamTest.cpp
  BlockFrequencyTest.cpp
  BranchProbabilityTest.cpp
  CachePruningTest.cpp
  CrashRecoveryTest.cpp
  Casting.cpp
  CheckedArithmeticTest.cpp
  Chrono.cpp
  CommandLineTest.cpp
  CompressionTest.cpp
  ConvertUTFTest.cpp
  DataExtractorTest.cpp
  DebugTest.cpp
  DebugCounterTest.cpp
  DJBTest.cpp
  EndianStreamTest.cpp
  EndianTest.cpp
  ErrnoTest.cpp
  ErrorOrTest.cpp
  ErrorTest.cpp
  FileOutputBufferTest.cpp
  FormatVariadicTest.cpp
  GlobPatternTest.cpp
  Host.cpp
  ItaniumManglingCanonicalizerTest.cpp
  JSONTest.cpp
  LEB128Test.cpp
  LineIteratorTest.cpp
  LockFileManagerTest.cpp
  MD5Test.cpp
  ManagedStatic.cpp
  MathExtrasTest.cpp
  MemoryBufferTest.cpp
  MemoryTest.cpp
  NativeFormatTests.cpp
  ParallelTest.cpp
  Path.cpp
  ProcessTest.cpp
  ProgramTest.cpp
  RegexTest.cpp
  ReverseIterationTest.cpp
  ReplaceFileTest.cpp
  ScaledNumberTest.cpp
  SourceMgrTest.cpp
  SpecialCaseListTest.cpp
  StringPool.cpp
  SwapByteOrderTest.cpp
  SymbolRemappingReaderTest.cpp
  TarWriterTest.cpp
  TargetParserTest.cpp
  TaskQueueTest.cpp
  ThreadLocalTest.cpp
  ThreadPool.cpp
  Threading.cpp
  TimerTest.cpp
  TypeNameTest.cpp
  TypeTraitsTest.cpp
  TrailingObjectsTest.cpp
  TrigramIndexTest.cpp
  UnicodeTest.cpp
  VersionTupleTest.cpp
  VirtualFileSystemTest.cpp
  YAMLIOTest.cpp
  YAMLParserTest.cpp
  formatted_raw_ostream_test.cpp
  raw_ostream_test.cpp
  raw_pwrite_stream_test.cpp
  raw_sha1_ostream_test.cpp
  xxhashTest.cpp
  )

target_link_libraries(SupportTests PRIVATE LLVMTestingSupport)

# Disable all warning for AlignOfTest.cpp,
# as it does things intentionally, and there is no reliable way of
# disabling all warnings for all the compilers by using pragmas.
# Don't disable on MSVC, because all incriminated warnings are already disabled
# in source; and because we would otherwise see this warning:
#   cl : Command line warning D9025: overriding '/W4' with '/w'
if(NOT MSVC)
  set_source_files_properties(AlignOfTest.cpp PROPERTIES COMPILE_FLAGS -w)
endif()
if(MSVC)
  if( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.15 )
    # Since VS2017 15.8, the following snippet: Failed<CustomSubError>()
    # generates a warning:
    # \svn\llvm\utils\unittest\googlemock\include\gmock\gmock-matchers.h(186):
    #   warning C5046: 'testing::MatcherInterface<T>::~MatcherInterface': Symbol involving type with internal linkage not defined
    set_source_files_properties(ErrorTest.cpp PROPERTIES COMPILE_FLAGS -wd5046)
  endif()
endif()

# ManagedStatic.cpp uses <pthread>.
target_link_libraries(SupportTests PRIVATE LLVMTestingSupport ${LLVM_PTHREAD_LIB})

add_subdirectory(DynamicLibrary)<commit_msg>VERSION_GREATER_EQUAL not supported in llvm cmake.<commit_after>set(LLVM_LINK_COMPONENTS
  Support
  )

add_llvm_unittest(SupportTests
  AlignOfTest.cpp
  AllocatorTest.cpp
  ARMAttributeParser.cpp
  ArrayRecyclerTest.cpp
  BinaryStreamTest.cpp
  BlockFrequencyTest.cpp
  BranchProbabilityTest.cpp
  CachePruningTest.cpp
  CrashRecoveryTest.cpp
  Casting.cpp
  CheckedArithmeticTest.cpp
  Chrono.cpp
  CommandLineTest.cpp
  CompressionTest.cpp
  ConvertUTFTest.cpp
  DataExtractorTest.cpp
  DebugTest.cpp
  DebugCounterTest.cpp
  DJBTest.cpp
  EndianStreamTest.cpp
  EndianTest.cpp
  ErrnoTest.cpp
  ErrorOrTest.cpp
  ErrorTest.cpp
  FileOutputBufferTest.cpp
  FormatVariadicTest.cpp
  GlobPatternTest.cpp
  Host.cpp
  ItaniumManglingCanonicalizerTest.cpp
  JSONTest.cpp
  LEB128Test.cpp
  LineIteratorTest.cpp
  LockFileManagerTest.cpp
  MD5Test.cpp
  ManagedStatic.cpp
  MathExtrasTest.cpp
  MemoryBufferTest.cpp
  MemoryTest.cpp
  NativeFormatTests.cpp
  ParallelTest.cpp
  Path.cpp
  ProcessTest.cpp
  ProgramTest.cpp
  RegexTest.cpp
  ReverseIterationTest.cpp
  ReplaceFileTest.cpp
  ScaledNumberTest.cpp
  SourceMgrTest.cpp
  SpecialCaseListTest.cpp
  StringPool.cpp
  SwapByteOrderTest.cpp
  SymbolRemappingReaderTest.cpp
  TarWriterTest.cpp
  TargetParserTest.cpp
  TaskQueueTest.cpp
  ThreadLocalTest.cpp
  ThreadPool.cpp
  Threading.cpp
  TimerTest.cpp
  TypeNameTest.cpp
  TypeTraitsTest.cpp
  TrailingObjectsTest.cpp
  TrigramIndexTest.cpp
  UnicodeTest.cpp
  VersionTupleTest.cpp
  VirtualFileSystemTest.cpp
  YAMLIOTest.cpp
  YAMLParserTest.cpp
  formatted_raw_ostream_test.cpp
  raw_ostream_test.cpp
  raw_pwrite_stream_test.cpp
  raw_sha1_ostream_test.cpp
  xxhashTest.cpp
  )

target_link_libraries(SupportTests PRIVATE LLVMTestingSupport)

# Disable all warning for AlignOfTest.cpp,
# as it does things intentionally, and there is no reliable way of
# disabling all warnings for all the compilers by using pragmas.
# Don't disable on MSVC, because all incriminated warnings are already disabled
# in source; and because we would otherwise see this warning:
#   cl : Command line warning D9025: overriding '/W4' with '/w'
if(NOT MSVC)
  set_source_files_properties(AlignOfTest.cpp PROPERTIES COMPILE_FLAGS -w)
endif()
if(MSVC)
  if( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.14 )
    # Since VS2017 15.8, the following snippet: Failed<CustomSubError>()
    # generates a warning:
    # \svn\llvm\utils\unittest\googlemock\include\gmock\gmock-matchers.h(186):
    #   warning C5046: 'testing::MatcherInterface<T>::~MatcherInterface': Symbol involving type with internal linkage not defined
    set_source_files_properties(ErrorTest.cpp PROPERTIES COMPILE_FLAGS -wd5046)
  endif()
endif()

# ManagedStatic.cpp uses <pthread>.
target_link_libraries(SupportTests PRIVATE LLVMTestingSupport ${LLVM_PTHREAD_LIB})

add_subdirectory(DynamicLibrary)
{'fraction_non_alphanumeric': 0.06097346687752592, 'fraction_numerical': 0.011245826743981726, 'mean_word_length': 4.886246122026887, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '906955', 'n_tokens_mistral': 1992, 'n_tokens_neox': 1897, 'n_words': 372}