diff options
author | David Blaikie <dblaikie@gmail.com> | 2017-04-12 21:14:04 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2017-04-12 21:14:04 +0000 |
commit | 01692f0fd276b6e935da06174aed22770d5db477 (patch) | |
tree | 6c46e06e128e4a8c90424c8ee9f18a0c62115978 /test/Modules/codegen.test | |
parent | 0f4fb48b66fd36cae33a4db137708ee7659a65d2 (diff) |
Modular Codegen: Include testing for inline asm as well as some commentary on the implementaiton choice.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300106 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules/codegen.test')
-rw-r--r-- | test/Modules/codegen.test | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Modules/codegen.test b/test/Modules/codegen.test index e8faa12fd9..1bdea5df43 100644 --- a/test/Modules/codegen.test +++ b/test/Modules/codegen.test @@ -6,6 +6,20 @@ RUN: %clang_cc1 -triple=x86_64-linux-gnu -fmodules-codegen -fmodules-debuginfo - RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -debug-info-kind=limited -o - %t/foo.pcm | FileCheck --check-prefix=FOO --check-prefix=BOTH %s RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -debug-info-kind=limited -o - -fmodules -fmodule-file=%t/foo.pcm %S/Inputs/codegen/use.cpp | FileCheck --check-prefix=BOTH --check-prefix=USE %s +For want of any better definition, inline asm goes "everywhere" the same as it +if it were in a header (with the disadvantage that the inline asm will be +included in the program if the module is used, even if the header containing +the inline asm is never included - unlike a non-modular build). + +This is inconsistent with how namespace scope static variables are handled - +where they only appear in the code that includes a header. This functionality +was implemented to workaround/support the initialization of iostreams +(implemented as a namespace scope static in the header - only to be provided +when that specific header is included in the program). + +FOO: module asm "narf" +USE: module asm "narf" + FOO: $_Z2f1PKcz = comdat any FOO: $_ZN13implicit_dtorD1Ev = comdat any USE: $_Z4instIiEvv = comdat any |