dang updated this revision to Diff 265262. dang added a comment. Herald added a subscriber: ormris.
Add a small bug fix and test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79998/new/ https://reviews.llvm.org/D79998 Files: clang/test/Modules/ASTSignature.c clang/test/Modules/Inputs/ASTHash/module.modulemap clang/test/Modules/Inputs/ASTHash/my_header_1.h clang/test/Modules/Inputs/ASTHash/my_header_2.h Index: clang/test/Modules/Inputs/ASTHash/my_header_2.h =================================================================== --- /dev/null +++ clang/test/Modules/Inputs/ASTHash/my_header_2.h @@ -0,0 +1,3 @@ +#include "my_header_1.h" + +extern my_int var; Index: clang/test/Modules/Inputs/ASTHash/my_header_1.h =================================================================== --- /dev/null +++ clang/test/Modules/Inputs/ASTHash/my_header_1.h @@ -0,0 +1 @@ +typedef int my_int; Index: clang/test/Modules/Inputs/ASTHash/module.modulemap =================================================================== --- /dev/null +++ clang/test/Modules/Inputs/ASTHash/module.modulemap @@ -0,0 +1,8 @@ +module MyHeader1 { + header "my_header_1.h" +} + +module MyHeader2 { + header "my_header_2.h" + export * +} Index: clang/test/Modules/ASTSignature.c =================================================================== --- /dev/null +++ clang/test/Modules/ASTSignature.c @@ -0,0 +1,18 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -iquote %S/Inputs/ASTHash/ -fsyntax-only -fmodules \ +// RUN: -fimplicit-module-maps -fmodules-strict-context-hash \ +// RUN: -fmodules-cache-path=%t %s -Rmodule-build 2> %t1 +// RUN: %clang_cc1 -iquote "/dev/null" -iquote %S/Inputs/ASTHash/ -fsyntax-only \ +// RUN: -fmodules -fimplicit-module-maps -fmodules-strict-context-hash \ +// RUN: -fmodules-cache-path=%t %s -Rmodule-build 2> %t2 +// RUN: cat %t1 | grep "remark: building module 'MyHeader2'" | cut -d "'" -f 4 \ +// RUN: | while read -r MODULE; do llvm-bcanalyzer --dump --disable-histogram \ +// RUN: $MODULE | grep "AST_SIGNATURE" > %t1.sig; done +// RUN: cat %t2 | grep "remark: building module 'MyHeader2'" | cut -d "'" -f 4 \ +// RUN: | while read -r MODULE; do llvm-bcanalyzer --dump --disable-histogram \ +// RUN: $MODULE | grep "AST_SIGNATURE" > %t1.sig; done +// RUN: diff %t1.sig %t2.sig + +#include "my_header_2.h" + +my_int var = 42;
Index: clang/test/Modules/Inputs/ASTHash/my_header_2.h =================================================================== --- /dev/null +++ clang/test/Modules/Inputs/ASTHash/my_header_2.h @@ -0,0 +1,3 @@ +#include "my_header_1.h" + +extern my_int var; Index: clang/test/Modules/Inputs/ASTHash/my_header_1.h =================================================================== --- /dev/null +++ clang/test/Modules/Inputs/ASTHash/my_header_1.h @@ -0,0 +1 @@ +typedef int my_int; Index: clang/test/Modules/Inputs/ASTHash/module.modulemap =================================================================== --- /dev/null +++ clang/test/Modules/Inputs/ASTHash/module.modulemap @@ -0,0 +1,8 @@ +module MyHeader1 { + header "my_header_1.h" +} + +module MyHeader2 { + header "my_header_2.h" + export * +} Index: clang/test/Modules/ASTSignature.c =================================================================== --- /dev/null +++ clang/test/Modules/ASTSignature.c @@ -0,0 +1,18 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -iquote %S/Inputs/ASTHash/ -fsyntax-only -fmodules \ +// RUN: -fimplicit-module-maps -fmodules-strict-context-hash \ +// RUN: -fmodules-cache-path=%t %s -Rmodule-build 2> %t1 +// RUN: %clang_cc1 -iquote "/dev/null" -iquote %S/Inputs/ASTHash/ -fsyntax-only \ +// RUN: -fmodules -fimplicit-module-maps -fmodules-strict-context-hash \ +// RUN: -fmodules-cache-path=%t %s -Rmodule-build 2> %t2 +// RUN: cat %t1 | grep "remark: building module 'MyHeader2'" | cut -d "'" -f 4 \ +// RUN: | while read -r MODULE; do llvm-bcanalyzer --dump --disable-histogram \ +// RUN: $MODULE | grep "AST_SIGNATURE" > %t1.sig; done +// RUN: cat %t2 | grep "remark: building module 'MyHeader2'" | cut -d "'" -f 4 \ +// RUN: | while read -r MODULE; do llvm-bcanalyzer --dump --disable-histogram \ +// RUN: $MODULE | grep "AST_SIGNATURE" > %t1.sig; done +// RUN: diff %t1.sig %t2.sig + +#include "my_header_2.h" + +my_int var = 42;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits