[llvm] fd824bd - Revert "[dsymutil] Fix assertion in the Reproducer/FileCollector when TMPDIR is empty"

Jonas Devlieghere via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 14 13:03:58 PST 2022


Author: Jonas Devlieghere
Date: 2022-11-14T13:03:47-08:00
New Revision: fd824bdc5e507b1da2c98815e5af05bc96a995d3

URL: https://github.com/llvm/llvm-project/commit/fd824bdc5e507b1da2c98815e5af05bc96a995d3
DIFF: https://github.com/llvm/llvm-project/commit/fd824bdc5e507b1da2c98815e5af05bc96a995d3.diff

LOG: Revert "[dsymutil] Fix assertion in the Reproducer/FileCollector when TMPDIR is empty"

This reverts commit 68efb4772c0d0e60cbfb09ea619b58d80c31ff0f because the
test fails on some of the buildbots.

Added: 
    

Modified: 
    llvm/lib/Support/FileCollector.cpp
    llvm/test/tools/dsymutil/X86/reproducer.test
    llvm/tools/dsymutil/Reproducer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Support/FileCollector.cpp b/llvm/lib/Support/FileCollector.cpp
index c0ce6b5d74e8e..5854baeebbb97 100644
--- a/llvm/lib/Support/FileCollector.cpp
+++ b/llvm/lib/Support/FileCollector.cpp
@@ -50,9 +50,7 @@ static bool isCaseSensitivePath(StringRef Path) {
 }
 
 FileCollector::FileCollector(std::string Root, std::string OverlayRoot)
-    : Root(Root), OverlayRoot(OverlayRoot) {
-  assert(sys::path::is_absolute(Root) && "Root not absolute");
-  assert(sys::path::is_absolute(OverlayRoot) && "OverlayRoot not absolute");
+    : Root(std::move(Root)), OverlayRoot(std::move(OverlayRoot)) {
 }
 
 void FileCollector::PathCanonicalizer::updateWithRealPath(

diff  --git a/llvm/test/tools/dsymutil/X86/reproducer.test b/llvm/test/tools/dsymutil/X86/reproducer.test
index 8421bee32a000..80db5bd2500e2 100644
--- a/llvm/test/tools/dsymutil/X86/reproducer.test
+++ b/llvm/test/tools/dsymutil/X86/reproducer.test
@@ -13,9 +13,6 @@ RUN: cp %p/../Inputs/basic3.macho.x86_64.o %t/Inputs
 # Verify all the files are present.
 RUN: dsymutil -f -o - -oso-prepend-path=%t %t/Inputs/basic.macho.x86_64 | llvm-dwarfdump -a - | FileCheck %s
 
-# Make sure we don't crash with an empty TMPDIR.
-RUN: env TMPDIR="" dsymutil -o -f %t.generate -oso-prepend-path=%t %t/Inputs/basic.macho.x86_64 2>&1
-
 # Create a reproducer.
 RUN: env DSYMUTIL_REPRODUCER_PATH=%t.repro dsymutil -gen-reproducer -f -o %t.generate -oso-prepend-path=%t %t/Inputs/basic.macho.x86_64 2>&1 | FileCheck %s --check-prefixes=REPRODUCER
 RUN: llvm-dwarfdump -a %t.generate | FileCheck %s

diff  --git a/llvm/tools/dsymutil/Reproducer.cpp b/llvm/tools/dsymutil/Reproducer.cpp
index dda5557b2dec9..2e28859c140dd 100644
--- a/llvm/tools/dsymutil/Reproducer.cpp
+++ b/llvm/tools/dsymutil/Reproducer.cpp
@@ -20,7 +20,6 @@ static std::string createReproducerDir(std::error_code &EC) {
   } else {
     EC = sys::fs::createUniqueDirectory("dsymutil", Root);
   }
-  sys::fs::make_absolute(Root);
   return EC ? "" : std::string(Root);
 }
 


        


More information about the llvm-commits mailing list