blob: aa9eba66a4f8169d5d6788b73912bc2b9790b30e [file] [log] [blame]
Chandler Carruth885e78c2015-03-24 21:18:10 +00001// RUN: rm -rf %t
2//
3// RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \
Richard Smith47972af2015-06-16 00:08:24 +00004// RUN: -fno-implicit-modules \
Chandler Carruth885e78c2015-03-24 21:18:10 +00005// RUN: -emit-module -fmodule-name=empty -o %t/base.pcm \
6// RUN: %s
7//
8// RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \
Richard Smith47972af2015-06-16 00:08:24 +00009// RUN: -fno-implicit-modules \
Chandler Carruth885e78c2015-03-24 21:18:10 +000010// RUN: -emit-module -fmodule-name=empty -o %t/check.pcm \
11// RUN: %s
12//
Richard Smith9c254182015-07-19 21:41:12 +000013// The module file should be identical each time we produce it.
Chandler Carruth885e78c2015-03-24 21:18:10 +000014// RUN: diff %t/base.pcm %t/check.pcm
Richard Smith9c254182015-07-19 21:41:12 +000015//
Richard Smith842d61f2015-07-20 08:40:51 +000016// We expect an empty module to be less than 30KB (and at least 10K, for now).
Richard Smith9c254182015-07-19 21:41:12 +000017// RUN: wc -c %t/base.pcm | FileCheck --check-prefix=CHECK-SIZE %s
Richard Smith842d61f2015-07-20 08:40:51 +000018// CHECK-SIZE: {{(^|[^0-9])[12][0-9][0-9][0-9][0-9]($|[^0-9])}}
Chandler Carruth885e78c2015-03-24 21:18:10 +000019
20module empty { header "Inputs/empty.h" export * }