diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-04-14 16:27:31 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-04-14 16:27:31 +0000 |
commit | 54feb8448953d6131737c51180441661535f8487 (patch) | |
tree | a9a4e0d3d83966d94bb92372d71c4fa6c7b3ff03 /clang/test/PCH/external-defs.c | |
parent | 06f440dd7b00ef8970242bcc9de79d223c35075e (diff) | |
download | bcm5719-llvm-54feb8448953d6131737c51180441661535f8487.tar.gz bcm5719-llvm-54feb8448953d6131737c51180441661535f8487.zip |
When building a PCH file, don't perform end-of-translation-unit
wrap-up (e.g., turning tentative definitions into definitions). Also,
very that, when we actually use the PCH file, we get the ride code
generation for tentative definitions and definitions that show up in
the PCH file.
llvm-svn: 69043
Diffstat (limited to 'clang/test/PCH/external-defs.c')
-rw-r--r-- | clang/test/PCH/external-defs.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/clang/test/PCH/external-defs.c b/clang/test/PCH/external-defs.c index 7be6c73bc75..fd14c4fa8b3 100644 --- a/clang/test/PCH/external-defs.c +++ b/clang/test/PCH/external-defs.c @@ -2,7 +2,20 @@ // RUN: clang-cc -triple x86_64-apple-darwin9 -emit-pch -o %t.pch %S/external-defs.h && // RUN: clang-cc -triple x86_64-apple-darwin9 -include-pch %t.pch -emit-llvm -o %t %s && -// RUN: grep "@x = common global i32 0, align 4" %t | count 1 && +// RUN: grep "@x = common global i32 0" %t | count 1 && // FIXME below: should be i32 17, but we don't serialize y's value yet -// RUN: grep "@y = common global i32 0, align 4" %t | count 1 && -// RUN: grep "@z" %t | count 0 +// RUN: grep "@y = common global i32 0" %t | count 1 && +// RUN: grep "@z" %t | count 0 && + +// RUN: grep "@x2 = global i32 19" %t | count 1 && +int x2 = 19; + +// RUN: grep "@incomplete_array = common global .*1 x i32" %t | count 1 && +// RUN: grep "@incomplete_array2 = common global .*17 x i32" %t | count 1 && +int incomplete_array2[17]; +// RUN: grep "@incomplete_array3 = common global .*1 x i32" %t | count 1 +int incomplete_array3[]; + +struct S { + int x, y; +}; |