File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,14 @@ RUN: env TMPDIR="%t/tempdir" dsymutil -o - -f %t/Inputs/basic.macho.x86_64
21
21
RUN: not ls %t/tempdir/dsymutil-*
22
22
23
23
# Create a reproducer.
24
- RUN: env LLVM_DIAGNOSTIC_DIR=%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
24
+ RUN: rm -rf %t.repro
25
+ 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
25
26
RUN: llvm-dwarfdump -a %t.generate | FileCheck %s
26
27
28
+ RUN: rm -rf %t.diags
29
+ RUN: env LLVM_DIAGNOSTIC_DIR=%t.diags dsymutil -gen-reproducer -f -o %t.generate -oso-prepend-path=%t %t/Inputs/basic.macho.x86_64 2>&1 | FileCheck %s --check-prefixes=REPRODUCER
30
+ RUN: ls %t.diags | grep 'dsymutil-' | count 1
31
+
27
32
# Remove the input files and verify that was successful.
28
33
RUN: rm -rf %t
29
34
RUN: not dsymutil -f -o %t.error -oso-prepend-path=%t %t/Inputs/basic.macho.x86_64 2>&1 | FileCheck %s --check-prefix=ERROR
Original file line number Diff line number Diff line change 8
8
9
9
#include " Reproducer.h"
10
10
#include " llvm/Support/Path.h"
11
+ #include " llvm/Support/Process.h"
11
12
12
13
using namespace llvm ;
13
14
using namespace llvm ::dsymutil;
14
15
15
16
static std::string createReproducerDir (std::error_code &EC) {
16
17
SmallString<128 > Root;
17
- if (const char *Path = getenv (" LLVM_DIAGNOSTIC_DIR " )) {
18
+ if (const char *Path = getenv (" DSYMUTIL_REPRODUCER_PATH " )) {
18
19
Root.assign (Path);
19
- EC = sys::fs::create_directory (Root);
20
+ EC = sys::fs::create_directories (Root);
21
+ } else if (const char *Path = getenv (" LLVM_DIAGNOSTIC_DIR" )) {
22
+ Root.assign (Path);
23
+ llvm::sys::path::append (
24
+ Root, " dsymutil-" + llvm::Twine (llvm::sys::Process::getProcessId ()));
25
+ EC = sys::fs::create_directories (Root);
20
26
} else {
21
27
EC = sys::fs::createUniqueDirectory (" dsymutil" , Root);
22
28
}
You can’t perform that action at this time.
0 commit comments