Skip to content

Commit 4b29c19

Browse files
committed
Fix the test.
1 parent c8eda8b commit 4b29c19

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

clang/test/ClangScanDeps/modules-debug-dir.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
// RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.in > %t/cdb.json
44
// RUN: clang-scan-deps -compilation-database %t/cdb.json -format \
55
// RUN: experimental-full > %t/result.json
6+
// RUN: cat %t/result.json | FileCheck %s
67

78
//--- cdb.json.in
89
[{
910
"directory": "DIR",
10-
"command": "clang -g -fdebug-info-for-profiling DIR/tu.c -fmodules -fmodules-cache-path=DIR/cache -IDIR/include/ -o DIR/tu.o",
11+
"command": "clang -c -g -gmodules DIR/tu.c -fmodules -fmodules-cache-path=DIR/cache -IDIR/include/ -fdebug-compilation-dir=DIR -o DIR/tu.o",
1112
"file": "DIR/tu.c"
1213
}]
1314

@@ -20,3 +21,10 @@ module mod {
2021

2122
//--- tu.c
2223
#include "mod.h"
24+
25+
// Check the -fdebug-compilation-dir used for the module is the root
26+
// directory when current working directory optimization is in effect.
27+
// CHECK: "modules": [
28+
// CHECK: "command-line": [
29+
// CHECK: "-fdebug-compilation-dir={{\/|C:|\/\/net}}",
30+
// CHECK: "translation-units": [

0 commit comments

Comments
 (0)