[PATCH] D101813: [Driver] Move -print-runtime-dir and -print-resource-dir tests

2021-05-05 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9d3dbcd24c7d: [Driver] Move -print-runtime-dir and 
-print-resource-dir tests (authored by phosek).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101813/new/

https://reviews.llvm.org/D101813

Files:
  clang/test/Driver/immediate-options.c
  clang/test/Driver/print-resource-dir.c
  clang/test/Driver/print-runtime-dir.c


Index: clang/test/Driver/print-runtime-dir.c
===
--- /dev/null
+++ clang/test/Driver/print-runtime-dir.c
@@ -0,0 +1,11 @@
+// Default directory layout
+// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
+// RUN:   -resource-dir=%S/Inputs/resource_dir \
+// RUN:   | FileCheck --check-prefix=PRINT-RUNTIME-DIR 
-DFILE=%S/Inputs/resource_dir %s
+// PRINT-RUNTIME-DIR: [[FILE]]{{/|\\}}lib{{/|\\}}windows
+
+// Per-target directory layout
+// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
+// RUN:   -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
+// RUN:   | FileCheck --check-prefix=PRINT-RUNTIME-DIR-PER-TARGET 
-DFILE=%S/Inputs/resource_dir_with_per_target_subdir  %s
+// PRINT-RUNTIME-DIR-PER-TARGET: 
[[FILE]]{{/|\\}}lib{{/|\\}}x86_64-pc-windows-msvc
Index: clang/test/Driver/print-resource-dir.c
===
--- /dev/null
+++ clang/test/Driver/print-resource-dir.c
@@ -0,0 +1,4 @@
+// RUN: %clang -print-resource-dir --target=x86_64-unknown-linux-gnu \
+// RUN:   -resource-dir=%S/Inputs/resource_dir \
+// RUN:   | FileCheck -check-prefix=PRINT-RESOURCE-DIR 
-DFILE=%S/Inputs/resource_dir %s
+// PRINT-RESOURCE-DIR: [[FILE]]
Index: clang/test/Driver/immediate-options.c
===
--- clang/test/Driver/immediate-options.c
+++ clang/test/Driver/immediate-options.c
@@ -12,20 +12,3 @@
 
 // RUN: %clang -dumpversion | FileCheck %s -check-prefix=DUMPVERSION
 // DUMPVERSION: {{[0-9]+\.[0-9.]+}}
-
-// Test if the -print-resource-dir option is accepted without error.
-// Allow unspecified output because the value of CLANG_RESOURCE_DIR is unknown.
-// RUN: %clang -print-resource-dir | FileCheck %s 
-check-prefix=PRINT-RESOURCE-DIR
-// PRINT-RESOURCE-DIR: {{.+}}
-
-// Default resource-dir layout
-// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
-// RUN:-resource-dir=%S/Inputs/resource_dir \
-// RUN:  | FileCheck --check-prefix=PRINT-RUNTIME-DIR %s
-// PRINT-RUNTIME-DIR: lib{{/|\\}}windows
-
-// Per target dir layout
-// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
-// RUN:-resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
-// RUN:  | FileCheck --check-prefix=PRINT-RUNTIME-DIR-PER-TARGET %s
-// PRINT-RUNTIME-DIR-PER-TARGET: lib{{/|\\}}x86_64-pc-windows-msvc


Index: clang/test/Driver/print-runtime-dir.c
===
--- /dev/null
+++ clang/test/Driver/print-runtime-dir.c
@@ -0,0 +1,11 @@
+// Default directory layout
+// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
+// RUN:   -resource-dir=%S/Inputs/resource_dir \
+// RUN:   | FileCheck --check-prefix=PRINT-RUNTIME-DIR -DFILE=%S/Inputs/resource_dir %s
+// PRINT-RUNTIME-DIR: [[FILE]]{{/|\\}}lib{{/|\\}}windows
+
+// Per-target directory layout
+// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
+// RUN:   -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
+// RUN:   | FileCheck --check-prefix=PRINT-RUNTIME-DIR-PER-TARGET -DFILE=%S/Inputs/resource_dir_with_per_target_subdir  %s
+// PRINT-RUNTIME-DIR-PER-TARGET: [[FILE]]{{/|\\}}lib{{/|\\}}x86_64-pc-windows-msvc
Index: clang/test/Driver/print-resource-dir.c
===
--- /dev/null
+++ clang/test/Driver/print-resource-dir.c
@@ -0,0 +1,4 @@
+// RUN: %clang -print-resource-dir --target=x86_64-unknown-linux-gnu \
+// RUN:   -resource-dir=%S/Inputs/resource_dir \
+// RUN:   | FileCheck -check-prefix=PRINT-RESOURCE-DIR -DFILE=%S/Inputs/resource_dir %s
+// PRINT-RESOURCE-DIR: [[FILE]]
Index: clang/test/Driver/immediate-options.c
===
--- clang/test/Driver/immediate-options.c
+++ clang/test/Driver/immediate-options.c
@@ -12,20 +12,3 @@
 
 // RUN: %clang -dumpversion | FileCheck %s -check-prefix=DUMPVERSION
 // DUMPVERSION: {{[0-9]+\.[0-9.]+}}
-
-// Test if the -print-resource-dir option is accepted without error.
-// Allow unspecified output because the value of CLANG_RESOURCE_DIR is unknown.
-// RUN: %clang -print-resource-dir | FileCheck %s -check-prefix=PRINT-RESOURCE-DIR
-// PRINT-RESOURCE-DIR: {{.+}}
-
-// Default resource-dir layout
-// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
-// RUN:-resource-dir=%S/Inputs/resource_dir \
-// RUN:  

[PATCH] D101813: [Driver] Move -print-runtime-dir and -print-resource-dir tests

2021-05-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

Thanks!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101813/new/

https://reviews.llvm.org/D101813

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D101813: [Driver] Move -print-runtime-dir and -print-resource-dir tests

2021-05-05 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments.



Comment at: clang/test/Driver/print-resource-dir.c:3
+// RUN:-resource-dir=%S/Inputs/resource-dir \
+// RUN:  | FileCheck %s -check-prefix=PRINT-RESOURCE-DIR
+// PRINT-RESOURCE-DIR: Inputs{{/|\\}}resource-dir

MaskRay wrote:
> You can use `-DFILE=%S/Inputs/resource-dir` and check that the printed string 
> is exactly `[[FILE]]`.
> 
> Just use `/` and let Harbomaster confirm that Windows doesn't need backslash.
Thanks for the suggestion.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101813/new/

https://reviews.llvm.org/D101813

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D101813: [Driver] Move -print-runtime-dir and -print-resource-dir tests

2021-05-05 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 342954.
phosek marked an inline comment as done.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101813/new/

https://reviews.llvm.org/D101813

Files:
  clang/test/Driver/immediate-options.c
  clang/test/Driver/print-resource-dir.c
  clang/test/Driver/print-runtime-dir.c


Index: clang/test/Driver/print-runtime-dir.c
===
--- /dev/null
+++ clang/test/Driver/print-runtime-dir.c
@@ -0,0 +1,11 @@
+// Default directory layout
+// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
+// RUN:   -resource-dir=%S/Inputs/resource_dir \
+// RUN:   | FileCheck --check-prefix=PRINT-RUNTIME-DIR 
-DFILE=%S/Inputs/resource_dir %s
+// PRINT-RUNTIME-DIR: [[FILE]]{{/|\\}}lib{{/|\\}}windows
+
+// Per-target directory layout
+// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
+// RUN:   -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
+// RUN:   | FileCheck --check-prefix=PRINT-RUNTIME-DIR-PER-TARGET 
-DFILE=%S/Inputs/resource_dir_with_per_target_subdir  %s
+// PRINT-RUNTIME-DIR-PER-TARGET: 
[[FILE]]{{/|\\}}lib{{/|\\}}x86_64-pc-windows-msvc
Index: clang/test/Driver/print-resource-dir.c
===
--- /dev/null
+++ clang/test/Driver/print-resource-dir.c
@@ -0,0 +1,4 @@
+// RUN: %clang -print-resource-dir --target=x86_64-unknown-linux-gnu \
+// RUN:   -resource-dir=%S/Inputs/resource_dir \
+// RUN:   | FileCheck -check-prefix=PRINT-RESOURCE-DIR 
-DFILE=%S/Inputs/resource_dir %s
+// PRINT-RESOURCE-DIR: [[FILE]]
Index: clang/test/Driver/immediate-options.c
===
--- clang/test/Driver/immediate-options.c
+++ clang/test/Driver/immediate-options.c
@@ -12,20 +12,3 @@
 
 // RUN: %clang -dumpversion | FileCheck %s -check-prefix=DUMPVERSION
 // DUMPVERSION: {{[0-9]+\.[0-9.]+}}
-
-// Test if the -print-resource-dir option is accepted without error.
-// Allow unspecified output because the value of CLANG_RESOURCE_DIR is unknown.
-// RUN: %clang -print-resource-dir | FileCheck %s 
-check-prefix=PRINT-RESOURCE-DIR
-// PRINT-RESOURCE-DIR: {{.+}}
-
-// Default resource-dir layout
-// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
-// RUN:-resource-dir=%S/Inputs/resource_dir \
-// RUN:  | FileCheck --check-prefix=PRINT-RUNTIME-DIR %s
-// PRINT-RUNTIME-DIR: lib{{/|\\}}windows
-
-// Per target dir layout
-// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
-// RUN:-resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
-// RUN:  | FileCheck --check-prefix=PRINT-RUNTIME-DIR-PER-TARGET %s
-// PRINT-RUNTIME-DIR-PER-TARGET: lib{{/|\\}}x86_64-pc-windows-msvc


Index: clang/test/Driver/print-runtime-dir.c
===
--- /dev/null
+++ clang/test/Driver/print-runtime-dir.c
@@ -0,0 +1,11 @@
+// Default directory layout
+// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
+// RUN:   -resource-dir=%S/Inputs/resource_dir \
+// RUN:   | FileCheck --check-prefix=PRINT-RUNTIME-DIR -DFILE=%S/Inputs/resource_dir %s
+// PRINT-RUNTIME-DIR: [[FILE]]{{/|\\}}lib{{/|\\}}windows
+
+// Per-target directory layout
+// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
+// RUN:   -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
+// RUN:   | FileCheck --check-prefix=PRINT-RUNTIME-DIR-PER-TARGET -DFILE=%S/Inputs/resource_dir_with_per_target_subdir  %s
+// PRINT-RUNTIME-DIR-PER-TARGET: [[FILE]]{{/|\\}}lib{{/|\\}}x86_64-pc-windows-msvc
Index: clang/test/Driver/print-resource-dir.c
===
--- /dev/null
+++ clang/test/Driver/print-resource-dir.c
@@ -0,0 +1,4 @@
+// RUN: %clang -print-resource-dir --target=x86_64-unknown-linux-gnu \
+// RUN:   -resource-dir=%S/Inputs/resource_dir \
+// RUN:   | FileCheck -check-prefix=PRINT-RESOURCE-DIR -DFILE=%S/Inputs/resource_dir %s
+// PRINT-RESOURCE-DIR: [[FILE]]
Index: clang/test/Driver/immediate-options.c
===
--- clang/test/Driver/immediate-options.c
+++ clang/test/Driver/immediate-options.c
@@ -12,20 +12,3 @@
 
 // RUN: %clang -dumpversion | FileCheck %s -check-prefix=DUMPVERSION
 // DUMPVERSION: {{[0-9]+\.[0-9.]+}}
-
-// Test if the -print-resource-dir option is accepted without error.
-// Allow unspecified output because the value of CLANG_RESOURCE_DIR is unknown.
-// RUN: %clang -print-resource-dir | FileCheck %s -check-prefix=PRINT-RESOURCE-DIR
-// PRINT-RESOURCE-DIR: {{.+}}
-
-// Default resource-dir layout
-// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
-// RUN:-resource-dir=%S/Inputs/resource_dir \
-// RUN:  | FileCheck --check-prefix=PRINT-RUNTIME-DIR %s
-// PRINT-RUNTIME-DIR: lib{{/|\\}}windows
-
-// Per target 

[PATCH] D101813: [Driver] Move -print-runtime-dir and -print-resource-dir tests

2021-05-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments.



Comment at: clang/test/Driver/print-resource-dir.c:3
+// RUN:-resource-dir=%S/Inputs/resource-dir \
+// RUN:  | FileCheck %s -check-prefix=PRINT-RESOURCE-DIR
+// PRINT-RESOURCE-DIR: Inputs{{/|\\}}resource-dir

You can use `-DFILE=%S/Inputs/resource-dir` and check that the printed string 
is exactly `[[FILE]]`.

Just use `/` and let Harbomaster confirm that Windows doesn't need backslash.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101813/new/

https://reviews.llvm.org/D101813

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D101813: [Driver] Move -print-runtime-dir and -print-resource-dir tests

2021-05-04 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 342950.
phosek marked an inline comment as done.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101813/new/

https://reviews.llvm.org/D101813

Files:
  clang/test/Driver/immediate-options.c
  clang/test/Driver/print-resource-dir.c
  clang/test/Driver/print-runtime-dir.c


Index: clang/test/Driver/print-runtime-dir.c
===
--- /dev/null
+++ clang/test/Driver/print-runtime-dir.c
@@ -0,0 +1,11 @@
+// Default directory layout
+// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
+// RUN:-resource-dir=%S/Inputs/resource_dir \
+// RUN:  | FileCheck --check-prefix=PRINT-RUNTIME-DIR %s
+// PRINT-RUNTIME-DIR: lib{{/|\\}}windows
+
+// Per-target directory layout
+// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
+// RUN:-resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
+// RUN:  | FileCheck --check-prefix=PRINT-RUNTIME-DIR-PER-TARGET %s
+// PRINT-RUNTIME-DIR-PER-TARGET: lib{{/|\\}}x86_64-pc-windows-msvc
Index: clang/test/Driver/print-resource-dir.c
===
--- /dev/null
+++ clang/test/Driver/print-resource-dir.c
@@ -0,0 +1,4 @@
+// RUN: %clang -print-resource-dir --target=x86_64-unknown-linux-gnu \
+// RUN:-resource-dir=%S/Inputs/resource-dir \
+// RUN:  | FileCheck %s -check-prefix=PRINT-RESOURCE-DIR
+// PRINT-RESOURCE-DIR: Inputs{{/|\\}}resource-dir
Index: clang/test/Driver/immediate-options.c
===
--- clang/test/Driver/immediate-options.c
+++ clang/test/Driver/immediate-options.c
@@ -12,20 +12,3 @@
 
 // RUN: %clang -dumpversion | FileCheck %s -check-prefix=DUMPVERSION
 // DUMPVERSION: {{[0-9]+\.[0-9.]+}}
-
-// Test if the -print-resource-dir option is accepted without error.
-// Allow unspecified output because the value of CLANG_RESOURCE_DIR is unknown.
-// RUN: %clang -print-resource-dir | FileCheck %s 
-check-prefix=PRINT-RESOURCE-DIR
-// PRINT-RESOURCE-DIR: {{.+}}
-
-// Default resource-dir layout
-// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
-// RUN:-resource-dir=%S/Inputs/resource_dir \
-// RUN:  | FileCheck --check-prefix=PRINT-RUNTIME-DIR %s
-// PRINT-RUNTIME-DIR: lib{{/|\\}}windows
-
-// Per target dir layout
-// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
-// RUN:-resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
-// RUN:  | FileCheck --check-prefix=PRINT-RUNTIME-DIR-PER-TARGET %s
-// PRINT-RUNTIME-DIR-PER-TARGET: lib{{/|\\}}x86_64-pc-windows-msvc


Index: clang/test/Driver/print-runtime-dir.c
===
--- /dev/null
+++ clang/test/Driver/print-runtime-dir.c
@@ -0,0 +1,11 @@
+// Default directory layout
+// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
+// RUN:-resource-dir=%S/Inputs/resource_dir \
+// RUN:  | FileCheck --check-prefix=PRINT-RUNTIME-DIR %s
+// PRINT-RUNTIME-DIR: lib{{/|\\}}windows
+
+// Per-target directory layout
+// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
+// RUN:-resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
+// RUN:  | FileCheck --check-prefix=PRINT-RUNTIME-DIR-PER-TARGET %s
+// PRINT-RUNTIME-DIR-PER-TARGET: lib{{/|\\}}x86_64-pc-windows-msvc
Index: clang/test/Driver/print-resource-dir.c
===
--- /dev/null
+++ clang/test/Driver/print-resource-dir.c
@@ -0,0 +1,4 @@
+// RUN: %clang -print-resource-dir --target=x86_64-unknown-linux-gnu \
+// RUN:-resource-dir=%S/Inputs/resource-dir \
+// RUN:  | FileCheck %s -check-prefix=PRINT-RESOURCE-DIR
+// PRINT-RESOURCE-DIR: Inputs{{/|\\}}resource-dir
Index: clang/test/Driver/immediate-options.c
===
--- clang/test/Driver/immediate-options.c
+++ clang/test/Driver/immediate-options.c
@@ -12,20 +12,3 @@
 
 // RUN: %clang -dumpversion | FileCheck %s -check-prefix=DUMPVERSION
 // DUMPVERSION: {{[0-9]+\.[0-9.]+}}
-
-// Test if the -print-resource-dir option is accepted without error.
-// Allow unspecified output because the value of CLANG_RESOURCE_DIR is unknown.
-// RUN: %clang -print-resource-dir | FileCheck %s -check-prefix=PRINT-RESOURCE-DIR
-// PRINT-RESOURCE-DIR: {{.+}}
-
-// Default resource-dir layout
-// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
-// RUN:-resource-dir=%S/Inputs/resource_dir \
-// RUN:  | FileCheck --check-prefix=PRINT-RUNTIME-DIR %s
-// PRINT-RUNTIME-DIR: lib{{/|\\}}windows
-
-// Per target dir layout
-// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
-// RUN:-resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
-// RUN:  | FileCheck 

[PATCH] D101813: [Driver] Move -print-runtime-dir and -print-resource-dir tests

2021-05-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments.



Comment at: clang/test/Driver/print-resource-dir.c:1
+// Test if the -print-resource-dir option is accepted without error.
+// Allow unspecified output because the value of CLANG_RESOURCE_DIR is unknown.

This isn't very useful. You can specify `-resource-dir` and check the output.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101813/new/

https://reviews.llvm.org/D101813

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D101813: [Driver] Move -print-runtime-dir and -print-resource-dir tests

2021-05-03 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision.
phosek added a reviewer: MaskRay.
phosek requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Put these into a separate files to match other -print-* options tests.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101813

Files:
  clang/test/Driver/immediate-options.c
  clang/test/Driver/print-resource-dir.c
  clang/test/Driver/print-runtime-dir.c


Index: clang/test/Driver/print-runtime-dir.c
===
--- /dev/null
+++ clang/test/Driver/print-runtime-dir.c
@@ -0,0 +1,11 @@
+// Default resource-dir layout
+// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
+// RUN:-resource-dir=%S/Inputs/resource_dir \
+// RUN:  | FileCheck --check-prefix=PRINT-RUNTIME-DIR %s
+// PRINT-RUNTIME-DIR: lib{{/|\\}}windows
+
+// Per target dir layout
+// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
+// RUN:-resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
+// RUN:  | FileCheck --check-prefix=PRINT-RUNTIME-DIR-PER-TARGET %s
+// PRINT-RUNTIME-DIR-PER-TARGET: lib{{/|\\}}x86_64-pc-windows-msvc
Index: clang/test/Driver/print-resource-dir.c
===
--- /dev/null
+++ clang/test/Driver/print-resource-dir.c
@@ -0,0 +1,4 @@
+// Test if the -print-resource-dir option is accepted without error.
+// Allow unspecified output because the value of CLANG_RESOURCE_DIR is unknown.
+// RUN: %clang -print-resource-dir | FileCheck %s 
-check-prefix=PRINT-RESOURCE-DIR
+// PRINT-RESOURCE-DIR: {{.+}}
Index: clang/test/Driver/immediate-options.c
===
--- clang/test/Driver/immediate-options.c
+++ clang/test/Driver/immediate-options.c
@@ -12,20 +12,3 @@
 
 // RUN: %clang -dumpversion | FileCheck %s -check-prefix=DUMPVERSION
 // DUMPVERSION: {{[0-9]+\.[0-9.]+}}
-
-// Test if the -print-resource-dir option is accepted without error.
-// Allow unspecified output because the value of CLANG_RESOURCE_DIR is unknown.
-// RUN: %clang -print-resource-dir | FileCheck %s 
-check-prefix=PRINT-RESOURCE-DIR
-// PRINT-RESOURCE-DIR: {{.+}}
-
-// Default resource-dir layout
-// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
-// RUN:-resource-dir=%S/Inputs/resource_dir \
-// RUN:  | FileCheck --check-prefix=PRINT-RUNTIME-DIR %s
-// PRINT-RUNTIME-DIR: lib{{/|\\}}windows
-
-// Per target dir layout
-// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
-// RUN:-resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
-// RUN:  | FileCheck --check-prefix=PRINT-RUNTIME-DIR-PER-TARGET %s
-// PRINT-RUNTIME-DIR-PER-TARGET: lib{{/|\\}}x86_64-pc-windows-msvc


Index: clang/test/Driver/print-runtime-dir.c
===
--- /dev/null
+++ clang/test/Driver/print-runtime-dir.c
@@ -0,0 +1,11 @@
+// Default resource-dir layout
+// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
+// RUN:-resource-dir=%S/Inputs/resource_dir \
+// RUN:  | FileCheck --check-prefix=PRINT-RUNTIME-DIR %s
+// PRINT-RUNTIME-DIR: lib{{/|\\}}windows
+
+// Per target dir layout
+// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
+// RUN:-resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
+// RUN:  | FileCheck --check-prefix=PRINT-RUNTIME-DIR-PER-TARGET %s
+// PRINT-RUNTIME-DIR-PER-TARGET: lib{{/|\\}}x86_64-pc-windows-msvc
Index: clang/test/Driver/print-resource-dir.c
===
--- /dev/null
+++ clang/test/Driver/print-resource-dir.c
@@ -0,0 +1,4 @@
+// Test if the -print-resource-dir option is accepted without error.
+// Allow unspecified output because the value of CLANG_RESOURCE_DIR is unknown.
+// RUN: %clang -print-resource-dir | FileCheck %s -check-prefix=PRINT-RESOURCE-DIR
+// PRINT-RESOURCE-DIR: {{.+}}
Index: clang/test/Driver/immediate-options.c
===
--- clang/test/Driver/immediate-options.c
+++ clang/test/Driver/immediate-options.c
@@ -12,20 +12,3 @@
 
 // RUN: %clang -dumpversion | FileCheck %s -check-prefix=DUMPVERSION
 // DUMPVERSION: {{[0-9]+\.[0-9.]+}}
-
-// Test if the -print-resource-dir option is accepted without error.
-// Allow unspecified output because the value of CLANG_RESOURCE_DIR is unknown.
-// RUN: %clang -print-resource-dir | FileCheck %s -check-prefix=PRINT-RESOURCE-DIR
-// PRINT-RESOURCE-DIR: {{.+}}
-
-// Default resource-dir layout
-// RUN: %clang -print-runtime-dir --target=x86_64-pc-windows-msvc \
-// RUN:-resource-dir=%S/Inputs/resource_dir \
-// RUN:  | FileCheck --check-prefix=PRINT-RUNTIME-DIR %s
-// PRINT-RUNTIME-DIR: lib{{/|\\}}windows
-
-// Per target dir layout
-// RUN: %clang -print-runtime-dir