diff options
author | John Thompson <John.Thompson.JTSoftware@gmail.com> | 2013-10-15 13:52:33 +0000 |
---|---|---|
committer | John Thompson <John.Thompson.JTSoftware@gmail.com> | 2013-10-15 13:52:33 +0000 |
commit | 5ab4f11152aff787007daf45e45c51fb38e17c77 (patch) | |
tree | 57f90f48adefe936921b58367d011ba9e20ac6c3 /clang-tools-extra/test/modularize | |
parent | e3eadf0f3b46a631de5d9224c6cca1074b238bb5 (diff) | |
download | bcm5719-llvm-5ab4f11152aff787007daf45e45c51fb38e17c77.tar.gz bcm5719-llvm-5ab4f11152aff787007daf45e45c51fb38e17c77.zip |
Added module map generation option.
llvm-svn: 192703
Diffstat (limited to 'clang-tools-extra/test/modularize')
6 files changed, 52 insertions, 0 deletions
diff --git a/clang-tools-extra/test/modularize/Inputs/SubModule1/Header1.h b/clang-tools-extra/test/modularize/Inputs/SubModule1/Header1.h new file mode 100644 index 00000000000..ea89f0f1ae6 --- /dev/null +++ b/clang-tools-extra/test/modularize/Inputs/SubModule1/Header1.h @@ -0,0 +1 @@ +// Header1.h - Empty. diff --git a/clang-tools-extra/test/modularize/Inputs/SubModule1/Header2.h b/clang-tools-extra/test/modularize/Inputs/SubModule1/Header2.h new file mode 100644 index 00000000000..7c71e981fc2 --- /dev/null +++ b/clang-tools-extra/test/modularize/Inputs/SubModule1/Header2.h @@ -0,0 +1 @@ +// Header2.h - Empty. diff --git a/clang-tools-extra/test/modularize/Inputs/SubModule2/Header3.h b/clang-tools-extra/test/modularize/Inputs/SubModule2/Header3.h new file mode 100644 index 00000000000..bb56afa00cb --- /dev/null +++ b/clang-tools-extra/test/modularize/Inputs/SubModule2/Header3.h @@ -0,0 +1 @@ +// Header3.h - Empty. diff --git a/clang-tools-extra/test/modularize/Inputs/SubModule2/Header4.h b/clang-tools-extra/test/modularize/Inputs/SubModule2/Header4.h new file mode 100644 index 00000000000..07ec9516d11 --- /dev/null +++ b/clang-tools-extra/test/modularize/Inputs/SubModule2/Header4.h @@ -0,0 +1 @@ +// Header4.h - Empty. diff --git a/clang-tools-extra/test/modularize/NoProblemsAssistant.modularize b/clang-tools-extra/test/modularize/NoProblemsAssistant.modularize new file mode 100644 index 00000000000..2f0559fc15f --- /dev/null +++ b/clang-tools-extra/test/modularize/NoProblemsAssistant.modularize @@ -0,0 +1,45 @@ +# RUN: modularize -module-map-path=Output/NoProblemsAssistant.txt -root-module=Root -prefix=%S/Input %s +# RUN: FileCheck --input-file=%T/NoProblemsAssistant.txt %s + +SomeTypes.h +SomeDecls.h +SubModule1/Header1.h +SubModule1/Header2.h +SubModule2/Header3.h +SubModule2/Header4.h +SubModule2.h + +# CHECK: // Output/NoProblemsAssistant.txt +# CHECK-NEXT: // Generated by: modularize -module-map-path=Output/NoProblemsAssistant.txt -root-module=Root -prefix={{.*}}{{[/\\]}}{{.*}} {{.*}}{{[/\\]}}NoProblemsAssistant.modularize +# CHECK: module Root { +# CHECK-NEXT: module SomeTypes { +# CHECK-NEXT: header "SomeTypes.h" +# CHECK-NEXT: export * +# CHECK-NEXT: } +# CHECK-NEXT: module SomeDecls { +# CHECK-NEXT: header "SomeDecls.h" +# CHECK-NEXT: export * +# CHECK-NEXT: } +# CHECK-NEXT: module SubModule1 { +# CHECK-NEXT: module Header1 { +# CHECK-NEXT: header "SubModule1/Header1.h" +# CHECK-NEXT: export * +# CHECK-NEXT: } +# CHECK-NEXT: module Header2 { +# CHECK-NEXT: header "SubModule1/Header2.h" +# CHECK-NEXT: export * +# CHECK-NEXT: } +# CHECK-NEXT: } +# CHECK-NEXT: module SubModule2 { +# CHECK-NEXT: module Header3 { +# CHECK-NEXT: header "SubModule2/Header3.h" +# CHECK-NEXT: export * +# CHECK-NEXT: } +# CHECK-NEXT: module Header4 { +# CHECK-NEXT: header "SubModule2/Header4.h" +# CHECK-NEXT: export * +# CHECK-NEXT: } +# CHECK-NEXT: header "SubModule2.h" +# CHECK-NEXT: export * +# CHECK-NEXT: } +# CHECK-NEXT: } diff --git a/clang-tools-extra/test/modularize/SubModule2.h b/clang-tools-extra/test/modularize/SubModule2.h new file mode 100644 index 00000000000..70d711b7e36 --- /dev/null +++ b/clang-tools-extra/test/modularize/SubModule2.h @@ -0,0 +1,3 @@ +// SubModule2.h - Master header with same name as directory. +#include "SubModule2/Header3.h" +#include "SubModule2/Header4.h" |