blob: d1552d9edd263872296f27c9d9261f1a928505d7 [file] [log] [blame]
David Blaikie4d923012017-01-31 21:28:19 +00001// RUN: %clang_cc1 -fmodules-ts -std=c++1z -triple=x86_64-linux-gnu -fmodules-codegen -emit-module-interface %s -o %t.pcm
Richard Smith8df390f2016-09-08 23:14:54 +00002// RUN: %clang_cc1 -fmodules-ts -std=c++1z -triple=x86_64-linux-gnu %t.pcm -emit-llvm -o - | FileCheck %s
3
Richard Smith81328ac2017-04-21 22:39:18 +00004export module FooBar;
Richard Smith8df390f2016-09-08 23:14:54 +00005
6export {
7 // CHECK-LABEL: define i32 @_Z1fv(
8 int f() { return 0; }
9}
10
David Blaikie4d923012017-01-31 21:28:19 +000011// CHECK-LABEL: define weak_odr void @_Z2f2v(
12inline void f2() { }
13
Richard Smith8df390f2016-09-08 23:14:54 +000014// FIXME: Emit global variables and their initializers with this TU.
15// Emit an initialization function that other TUs can call, with guard variable.
16
17// FIXME: Mangle non-exported symbols so they don't collide with
18// non-exported symbols from other modules?
19
20// FIXME: Formally-internal-linkage symbols that are used from an exported
21// symbol need a mangled name and external linkage.
22
23// FIXME: const-qualified variables don't have implicit internal linkage when owned by a module.