diff options
Diffstat (limited to 'test/Misc')
-rw-r--r-- | test/Misc/Inputs/module.modulemap | 1 | ||||
-rw-r--r-- | test/Misc/ast-dump-decl.c | 22 | ||||
-rw-r--r-- | test/Misc/ast-dump-decl.cpp | 5 | ||||
-rw-r--r-- | test/Misc/cc1as-compress.s | 8 |
4 files changed, 25 insertions, 11 deletions
diff --git a/test/Misc/Inputs/module.modulemap b/test/Misc/Inputs/module.modulemap new file mode 100644 index 0000000000000..a8ecb09390a25 --- /dev/null +++ b/test/Misc/Inputs/module.modulemap @@ -0,0 +1 @@ +module X {} diff --git a/test/Misc/ast-dump-decl.c b/test/Misc/ast-dump-decl.c index 45edea26b4f84..313c808c4ac8e 100644 --- a/test/Misc/ast-dump-decl.c +++ b/test/Misc/ast-dump-decl.c @@ -1,8 +1,13 @@ // RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump -ast-dump-filter Test %s | FileCheck -check-prefix CHECK -strict-whitespace %s // RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump %s | FileCheck -check-prefix CHECK-TU -strict-whitespace %s +// RUN: %clang_cc1 -fmodules -fmodules-local-submodule-visibility -fmodule-name=X -triple x86_64-unknown-unknown -fmodule-map-file=%S/Inputs/module.modulemap -ast-dump -ast-dump-filter Test %s -DMODULES | FileCheck -check-prefix CHECK -check-prefix CHECK-MODULES -strict-whitespace %s int TestLocation; -// CHECK: VarDecl 0x{{[^ ]*}} <{{.*}}:4:1, col:5> col:5 TestLocation +// CHECK: VarDecl 0x{{[^ ]*}} <{{.*}}:[[@LINE-1]]:1, col:5> col:5 TestLocation + +#ifdef MODULES +#pragma clang module begin X +#endif struct TestIndent { int x; @@ -33,7 +38,7 @@ typedef int TestTypedefDecl; // CHECK: TypedefDecl{{.*}} TestTypedefDecl 'int' __module_private__ typedef int TestTypedefDeclPrivate; -// CHECK: TypedefDecl{{.*}} TestTypedefDeclPrivate 'int' __module_private__ +// CHECK-MODULE: TypedefDecl{{.*}} TestTypedefDeclPrivate 'int' __module_private__ enum TestEnumDecl { testEnumDecl @@ -53,7 +58,7 @@ enum TestEnumDeclForward; // CHECK: EnumDecl{{.*}} TestEnumDeclForward __module_private__ enum TestEnumDeclPrivate; -// CHECK: EnumDecl{{.*}} TestEnumDeclPrivate __module_private__ +// CHECK-MODULE: EnumDecl{{.*}} TestEnumDeclPrivate __module_private__ struct TestRecordDecl { int i; @@ -83,7 +88,7 @@ struct TestRecordDeclForward; // CHECK: RecordDecl{{.*}} struct TestRecordDeclForward __module_private__ struct TestRecordDeclPrivate; -// CHECK: RecordDecl{{.*}} struct TestRecordDeclPrivate __module_private__ +// CHECK-MODULE: RecordDecl{{.*}} struct TestRecordDeclPrivate __module_private__ enum testEnumConstantDecl { TestEnumConstantDecl, @@ -136,7 +141,7 @@ struct testFieldDecl { // CHECK: FieldDecl{{.*}} TestFieldDecl 'int' // CHECK: FieldDecl{{.*}} TestFieldDeclWidth 'int' // CHECK-NEXT: IntegerLiteral -// CHECK: FieldDecl{{.*}} TestFieldDeclPrivate 'int' __module_private__ +// CHECK-MODULE: FieldDecl{{.*}} TestFieldDeclPrivate 'int' __module_private__ int TestVarDecl; // CHECK: VarDecl{{.*}} TestVarDecl 'int' @@ -148,7 +153,7 @@ __thread int TestVarDeclThread; // CHECK: VarDecl{{.*}} TestVarDeclThread 'int' tls{{$}} __module_private__ int TestVarDeclPrivate; -// CHECK: VarDecl{{.*}} TestVarDeclPrivate 'int' __module_private__ +// CHECK-MODULE: VarDecl{{.*}} TestVarDeclPrivate 'int' __module_private__ int TestVarDeclInit = 0; // CHECK: VarDecl{{.*}} TestVarDeclInit 'int' @@ -156,3 +161,8 @@ int TestVarDeclInit = 0; void testParmVarDecl(int TestParmVarDecl); // CHECK: ParmVarDecl{{.*}} TestParmVarDecl 'int' + +#ifdef MODULES +#pragma clang module end +#endif + diff --git a/test/Misc/ast-dump-decl.cpp b/test/Misc/ast-dump-decl.cpp index e1cdeb0995fa5..7370f46c5b322 100644 --- a/test/Misc/ast-dump-decl.cpp +++ b/test/Misc/ast-dump-decl.cpp @@ -95,17 +95,12 @@ class TestCXXRecordDeclPack : public T... { thread_local int TestThreadLocalInt; // CHECK: TestThreadLocalInt {{.*}} tls_dynamic -__module_private__ class TestCXXRecordDeclPrivate; -// CHECK: CXXRecordDecl{{.*}} class TestCXXRecordDeclPrivate __module_private__ - class testCXXMethodDecl { - __module_private__ void TestCXXMethodDeclPrivate(); virtual void TestCXXMethodDeclPure() = 0; void TestCXXMethodDeclDelete() = delete; void TestCXXMethodDeclThrow() throw(); void TestCXXMethodDeclThrowType() throw(int); }; -// CHECK: CXXMethodDecl{{.*}} TestCXXMethodDeclPrivate 'void (void)' __module_private__ // CHECK: CXXMethodDecl{{.*}} TestCXXMethodDeclPure 'void (void)' virtual pure // CHECK: CXXMethodDecl{{.*}} TestCXXMethodDeclDelete 'void (void)' delete // CHECK: CXXMethodDecl{{.*}} TestCXXMethodDeclThrow 'void (void) throw()' diff --git a/test/Misc/cc1as-compress.s b/test/Misc/cc1as-compress.s new file mode 100644 index 0000000000000..beba227138d87 --- /dev/null +++ b/test/Misc/cc1as-compress.s @@ -0,0 +1,8 @@ +// REQUIRES: zlib +// REQUIRES: x86-registered-target + +// RUN: %clang -cc1as -triple i686 --compress-debug-sections -filetype asm %s -o /dev/null 2>&1 | FileCheck -allow-empty %s +// RUN: %clang -cc1as -triple i686 -compress-debug-sections -filetype asm %s -o /dev/null 2>&1 | FileCheck -allow-empty %s + +// CHECK-NOT: error: unknown argument: + |