[llvm] 58079aa - Revert "Fix GSYM tests to run the yaml files and fix test failures on some machines."
Mitch Phillips via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 4 10:22:27 PST 2020
Author: Mitch Phillips
Date: 2020-03-04T10:21:54-08:00
New Revision: 58079aa91b4a35622b6eff1654175da6b2e1f7aa
URL: https://github.com/llvm/llvm-project/commit/58079aa91b4a35622b6eff1654175da6b2e1f7aa
DIFF: https://github.com/llvm/llvm-project/commit/58079aa91b4a35622b6eff1654175da6b2e1f7aa.diff
LOG: Revert "Fix GSYM tests to run the yaml files and fix test failures on some machines."
This reverts commit 8d41f1a02369537cae1a7d00c0fa717fc3aca575.
This change broke the MSan buildbots - see comments in
https://reviews.llvm.org/D75390 for more information.
Added:
llvm/test/tools/llvm-gsymutil/elf-dwarf.yaml
llvm/test/tools/llvm-gsymutil/fat-macho-dwarf.yaml
llvm/test/tools/llvm-gsymutil/mach-dwarf.yaml
Modified:
llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
Removed:
llvm/test/tools/llvm-gsymutil/ARM_AArch64/fat-macho-dwarf.yaml
llvm/test/tools/llvm-gsymutil/ARM_AArch64/lit.local.cfg
llvm/test/tools/llvm-gsymutil/X86/elf-dwarf.yaml
llvm/test/tools/llvm-gsymutil/X86/lit.local.cfg
llvm/test/tools/llvm-gsymutil/X86/mach-dwarf.yaml
################################################################################
diff --git a/llvm/lib/DebugInfo/GSYM/GsymCreator.cpp b/llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
index 091f1af9d11a..3a84ac41e86c 100644
--- a/llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
+++ b/llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
@@ -29,13 +29,7 @@ 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);
- // 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);
+ FileEntry FE(insertString(directory), insertString(filename));
std::lock_guard<std::recursive_mutex> Guard(Mutex);
const auto NextIndex = Files.size();
diff --git a/llvm/test/tools/llvm-gsymutil/ARM_AArch64/lit.local.cfg b/llvm/test/tools/llvm-gsymutil/ARM_AArch64/lit.local.cfg
deleted file mode 100644
index e06c15ef1413..000000000000
--- a/llvm/test/tools/llvm-gsymutil/ARM_AArch64/lit.local.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-if not ('ARM' in config.root.targets and 'AArch64' in config.root.targets):
- config.unsupported = True
-
-config.suffixes = ['.test', '.yaml']
diff --git a/llvm/test/tools/llvm-gsymutil/X86/lit.local.cfg b/llvm/test/tools/llvm-gsymutil/X86/lit.local.cfg
deleted file mode 100644
index 52c762f5cfb8..000000000000
--- a/llvm/test/tools/llvm-gsymutil/X86/lit.local.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-if not 'X86' in config.root.targets:
- config.unsupported = True
-
-config.suffixes = ['.test', '.yaml']
diff --git a/llvm/test/tools/llvm-gsymutil/X86/elf-dwarf.yaml b/llvm/test/tools/llvm-gsymutil/elf-dwarf.yaml
similarity index 100%
rename from llvm/test/tools/llvm-gsymutil/X86/elf-dwarf.yaml
rename to llvm/test/tools/llvm-gsymutil/elf-dwarf.yaml
diff --git a/llvm/test/tools/llvm-gsymutil/ARM_AArch64/fat-macho-dwarf.yaml b/llvm/test/tools/llvm-gsymutil/fat-macho-dwarf.yaml
similarity index 100%
rename from llvm/test/tools/llvm-gsymutil/ARM_AArch64/fat-macho-dwarf.yaml
rename to llvm/test/tools/llvm-gsymutil/fat-macho-dwarf.yaml
diff --git a/llvm/test/tools/llvm-gsymutil/X86/mach-dwarf.yaml b/llvm/test/tools/llvm-gsymutil/mach-dwarf.yaml
similarity index 100%
rename from llvm/test/tools/llvm-gsymutil/X86/mach-dwarf.yaml
rename to llvm/test/tools/llvm-gsymutil/mach-dwarf.yaml
diff --git a/llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp b/llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
index 2d75473a3fdf..6ad200927270 100644
--- a/llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
+++ b/llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
@@ -179,8 +179,7 @@ static bool filterArch(MachOObjectFile &Obj) {
if (ArchFilters.empty())
return true;
- Triple ObjTriple(Obj.getArchTriple());
- StringRef ObjArch = ObjTriple.getArchName();
+ StringRef ObjArch = Obj.getArchTriple().getArchName();
for (auto Arch : ArchFilters) {
// Match name.
@@ -351,8 +350,7 @@ static llvm::Error handleBuffer(StringRef Filename, MemoryBufferRef Buffer,
error(Filename, errorToErrorCode(BinOrErr.takeError()));
if (auto *Obj = dyn_cast<ObjectFile>(BinOrErr->get())) {
- Triple ObjTriple(Obj->makeTriple());
- auto ArchName = ObjTriple.getArchName();
+ auto ArchName = Obj->makeTriple().getArchName();
outs() << "Output file (" << ArchName << "): " << OutFile << "\n";
if (auto Err = handleObjectFile(*Obj, OutFile.c_str()))
return Err;
@@ -376,8 +374,7 @@ static llvm::Error handleBuffer(StringRef Filename, MemoryBufferRef Buffer,
// Now handle each architecture we need to convert.
for (auto &Obj: FilterObjs) {
- Triple ObjTriple(Obj->getArchTriple());
- auto ArchName = ObjTriple.getArchName();
+ auto ArchName = Obj->getArchTriple().getArchName();
std::string ArchOutFile(OutFile);
// If we are only handling a single architecture, then we will use the
// normal output file. If we are handling multiple architectures append
More information about the llvm-commits
mailing list