[PATCH] D75390: Fix GSYM tests to run the yaml files and fix test failures on some machines.
Greg Clayton via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 4 19:36:34 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4050b01ba9ec: Fix GSYM tests to run the yaml files and fix test failures on some machines. (authored by clayborg).
Changed prior to commit:
https://reviews.llvm.org/D75390?vs=247743&id=248380#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75390/new/
https://reviews.llvm.org/D75390
Files:
llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
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
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
llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
Index: llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
===================================================================
--- llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
+++ llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
@@ -179,7 +179,8 @@
if (ArchFilters.empty())
return true;
- StringRef ObjArch = Obj.getArchTriple().getArchName();
+ Triple ObjTriple(Obj.getArchTriple());
+ StringRef ObjArch = ObjTriple.getArchName();
for (auto Arch : ArchFilters) {
// Match name.
@@ -350,7 +351,8 @@
error(Filename, errorToErrorCode(BinOrErr.takeError()));
if (auto *Obj = dyn_cast<ObjectFile>(BinOrErr->get())) {
- auto ArchName = Obj->makeTriple().getArchName();
+ Triple ObjTriple(Obj->makeTriple());
+ auto ArchName = ObjTriple.getArchName();
outs() << "Output file (" << ArchName << "): " << OutFile << "\n";
if (auto Err = handleObjectFile(*Obj, OutFile.c_str()))
return Err;
@@ -374,7 +376,8 @@
// Now handle each architecture we need to convert.
for (auto &Obj: FilterObjs) {
- auto ArchName = Obj->getArchTriple().getArchName();
+ Triple ObjTriple(Obj->getArchTriple());
+ auto ArchName = ObjTriple.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
Index: llvm/test/tools/llvm-gsymutil/X86/lit.local.cfg
===================================================================
--- /dev/null
+++ llvm/test/tools/llvm-gsymutil/X86/lit.local.cfg
@@ -0,0 +1,4 @@
+if not 'X86' in config.root.targets:
+ config.unsupported = True
+
+config.suffixes = ['.test', '.yaml']
Index: llvm/test/tools/llvm-gsymutil/ARM_AArch64/lit.local.cfg
===================================================================
--- /dev/null
+++ llvm/test/tools/llvm-gsymutil/ARM_AArch64/lit.local.cfg
@@ -0,0 +1,4 @@
+if not ('ARM' in config.root.targets and 'AArch64' in config.root.targets):
+ config.unsupported = True
+
+config.suffixes = ['.test', '.yaml']
Index: llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
===================================================================
--- llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
+++ llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
@@ -74,7 +74,7 @@
Hdr.BaseAddress = MinAddr;
Hdr.NumAddresses = static_cast<uint32_t>(Funcs.size());
Hdr.StrtabOffset = 0; // We will fix this up later.
- Hdr.StrtabOffset = 0; // We will fix this up later.
+ Hdr.StrtabSize = 0; // We will fix this up later.
memset(Hdr.UUID, 0, sizeof(Hdr.UUID));
if (UUID.size() > sizeof(Hdr.UUID))
return createStringError(std::errc::invalid_argument,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75390.248380.patch
Type: text/x-patch
Size: 2683 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200305/da54d8ce/attachment.bin>
More information about the llvm-commits
mailing list