Commit 8d41f1a0 authored by Greg Clayton's avatar Greg Clayton
Browse files

Fix GSYM tests to run the yaml files and fix test failures on some machines.

YAML files were not being run during lit testing as there was no lit.local.cfg file. Once this was fixed, some buildbots would fail due to a StringRef that pointed to a std::string inside of a temporary llvm::Triple object. These issues are fixed here by making a local triple object that stays around long enough so the StringRef points to valid data. Also fixed an issue where strings for files in the file table could be added in opposite order due to parameters to function calls not having a strong ordering, which caused tests to fail. Added new arch specfic directories so when targets are not enabled, we continue to function just fine.

Differential Revision: https://reviews.llvm.org/D75390
parent b6b3fcdc
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -29,7 +29,13 @@ uint32_t GsymCreator::insertFile(StringRef Path,
                                 llvm::sys::path::Style Style) {
  llvm::StringRef directory = llvm::sys::path::parent_path(Path, Style);
  llvm::StringRef filename = llvm::sys::path::filename(Path, Style);
  FileEntry FE(insertString(directory), insertString(filename));
  // We must insert the strings first, then call the FileEntry constructor.
  // If we inline the insertString() function call into the constructor, the
  // call order is undefined due to parameter lists not having any ordering
  // requirements.
  const uint32_t Dir = insertString(directory);
  const uint32_t Base = insertString(filename);
  FileEntry FE(Dir, Base);

  std::lock_guard<std::recursive_mutex> Guard(Mutex);
  const auto NextIndex = Files.size();
+4 −0
Original line number Diff line number Diff line
if not ('ARM' in config.root.targets and 'AArch64' in config.root.targets):
    config.unsupported = True

config.suffixes = ['.test', '.yaml']
+4 −0
Original line number Diff line number Diff line
if not 'X86' in config.root.targets:
    config.unsupported = True

config.suffixes = ['.test', '.yaml']
Loading