David Blaikie | 4d92301 | 2017-01-31 21:28:19 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fmodules-ts -std=c++1z -triple=x86_64-linux-gnu -fmodules-codegen -emit-module-interface %s -o %t.pcm |
Richard Smith | 8df390f | 2016-09-08 23:14:54 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -fmodules-ts -std=c++1z -triple=x86_64-linux-gnu %t.pcm -emit-llvm -o - | FileCheck %s |
| 3 | |
Richard Smith | 81328ac | 2017-04-21 22:39:18 +0000 | [diff] [blame] | 4 | export module FooBar; |
Richard Smith | 8df390f | 2016-09-08 23:14:54 +0000 | [diff] [blame] | 5 | |
| 6 | export { |
Richard Smith | dd8b533 | 2017-09-04 05:37:53 +0000 | [diff] [blame^] | 7 | // CHECK-DAG: define i32 @_Z1fv( |
Richard Smith | 8df390f | 2016-09-08 23:14:54 +0000 | [diff] [blame] | 8 | int f() { return 0; } |
| 9 | } |
| 10 | |
Richard Smith | dd8b533 | 2017-09-04 05:37:53 +0000 | [diff] [blame^] | 11 | // CHECK-DAG: define weak_odr void @_ZW6FooBarE2f2v( |
David Blaikie | 4d92301 | 2017-01-31 21:28:19 +0000 | [diff] [blame] | 12 | inline void f2() { } |
| 13 | |
Richard Smith | dd8b533 | 2017-09-04 05:37:53 +0000 | [diff] [blame^] | 14 | // CHECK-DAG: define void @_ZW6FooBarE2f3v( |
| 15 | static void f3() {} |
| 16 | export void use_f3() { f3(); } |
| 17 | |
Richard Smith | 8df390f | 2016-09-08 23:14:54 +0000 | [diff] [blame] | 18 | // FIXME: Emit global variables and their initializers with this TU. |
Richard Smith | dd8b533 | 2017-09-04 05:37:53 +0000 | [diff] [blame^] | 19 | // Emit an initialization function that other TUs can call, with guard variable? |
Richard Smith | 8df390f | 2016-09-08 23:14:54 +0000 | [diff] [blame] | 20 | |
| 21 | // FIXME: const-qualified variables don't have implicit internal linkage when owned by a module. |