diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-02-06 02:06:43 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-02-06 02:06:43 +0000 |
| commit | aada85c5f707eafc2abbc92696c3394b7be762bd (patch) | |
| tree | 0dc1ce0b58d0d0b57c52e540e261519145be87d3 /clang/test/Modules | |
| parent | a40030f308759728ed4ab55847abff63a8ac2c61 (diff) | |
| download | bcm5719-llvm-aada85c5f707eafc2abbc92696c3394b7be762bd.tar.gz bcm5719-llvm-aada85c5f707eafc2abbc92696c3394b7be762bd.zip | |
[modules] Compress files embedded into a .pcm file, to reduce the disk usage of -fembed-all-files mode.
llvm-svn: 259976
Diffstat (limited to 'clang/test/Modules')
| -rw-r--r-- | clang/test/Modules/embed-files-compressed.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/clang/test/Modules/embed-files-compressed.cpp b/clang/test/Modules/embed-files-compressed.cpp new file mode 100644 index 00000000000..cf33a662f91 --- /dev/null +++ b/clang/test/Modules/embed-files-compressed.cpp @@ -0,0 +1,23 @@ +// REQUIRES: zlib +// REQUIRES: shell +// +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: echo '//////////////////////////////////////////////////////////////////////' > %t/a.h +// RUN: cat %t/a.h %t/a.h %t/a.h %t/a.h > %t/b.h +// RUN: cat %t/b.h %t/b.h %t/b.h %t/b.h > %t/a.h +// RUN: cat %t/a.h %t/a.h %t/a.h %t/a.h > %t/b.h +// RUN: cat %t/b.h %t/b.h %t/b.h %t/b.h > %t/a.h +// RUN: cat %t/a.h %t/a.h %t/a.h %t/a.h > %t/b.h +// RUN: cat %t/b.h %t/b.h %t/b.h %t/b.h > %t/a.h +// RUN: cat %t/a.h %t/a.h %t/a.h %t/a.h > %t/b.h +// RUN: cat %t/b.h %t/b.h %t/b.h %t/b.h > %t/a.h +// RUN: echo 'module a { header "a.h" }' > %t/modulemap +// +// RUN: %clang_cc1 -fmodules -I%t -fmodules-cache-path=%t -fmodule-name=a -emit-module %t/modulemap -fmodules-embed-all-files -o %t/a.pcm +// +// The above embeds ~4.5MB of highly-predictable /s and \ns into the pcm file. +// Check that the resulting file is under 40KB: +// +// RUN: wc -c %t/a.pcm | FileCheck --check-prefix=CHECK-SIZE %s +// CHECK-SIZE: {{(^|[^0-9])[123][0-9][0-9][0-9][0-9]($|[^0-9])}} |

