llvm-project/clang/test
Hans Wennborg 08c5a7b8fd [clang-cl] Don't emit dllexport inline functions etc. from pch files (PR37801)
With MSVC, PCH files are created along with an object file that needs to
be linked into the final library or executable. That object file
contains the code generated when building the headers. In particular, it
will include definitions of inline dllexport functions, and because they
are emitted in this object file, other files using the PCH do not need
to emit them. See the bug for an example.

This patch makes clang-cl match MSVC's behaviour in this regard, causing
significant compile-time savings when building dlls using precompiled
headers.

For example, in a 64-bit optimized shared library build of Chromium with
PCH, it reduces the binary size and compile time of
stroke_opacity_custom.obj from 9315564 bytes to 3659629 bytes and 14.6
to 6.63 s. The wall-clock time of building blink_core.dll goes from
38m41s to 22m33s. ("user" time goes from 1979m to 1142m).

Differential Revision: https://reviews.llvm.org/D48426

llvm-svn: 335466
2018-06-25 13:23:49 +00:00
..
ARCMT [ObjC] Allow declaring __strong pointer fields in structs in Objective-C 2018-02-28 07:15:55 +00:00
ASTMerge [ASTImporter] FriendDecl importing improvements 2018-04-25 17:28:03 +00:00
Analysis [analyzer] Checker for uninitialized C++ objects 2018-06-18 11:50:17 +00:00
CXX Restore pre-r335182 behavior for naming inherited constructors as 2018-06-22 19:50:19 +00:00
CodeCompletion [CodeComplete] Add a few extra tests for r333538. NFC 2018-06-01 09:49:53 +00:00
CodeGen [clang-cl] Don't emit dllexport inline functions etc. from pch files (PR37801) 2018-06-25 13:23:49 +00:00
CodeGenCUDA [CUDA][HIP] Allow CUDA __global__ functions to have amdgpu kernel attributes 2018-06-12 23:58:59 +00:00
CodeGenCXX [CodeGen] Provide source locations for UBSan type checks when emitting constructor calls. 2018-06-25 05:48:04 +00:00
CodeGenCoroutines [Coroutines] Less IR for noexcept await_resume 2018-06-23 18:57:26 +00:00
CodeGenObjC [CodeGen] Always use MSVC personality for windows-msvc targets 2018-06-08 00:41:01 +00:00
CodeGenObjCXX [CodeGen] Always use MSVC personality for windows-msvc targets 2018-06-08 00:41:01 +00:00
CodeGenOpenCL [AMDGPU] fixes for lds f32 builtins 2018-05-21 16:18:07 +00:00
Coverage Reapply "[Parse] Use CapturedStmt for @finally on MSVC" 2018-06-08 00:30:00 +00:00
CoverageMapping [Coverage] Remove a test dependency on the itanium ABI 2018-06-01 17:11:18 +00:00
Driver [clang-cl] Don't emit dllexport inline functions etc. from pch files (PR37801) 2018-06-25 13:23:49 +00:00
FixIt [Sema] -Wformat-pedantic only for NSInteger/NSUInteger %zu/%zi on Darwin 2018-06-22 21:54:40 +00:00
Format [clang-format] Fix bug where -dump-config failed on ObjC header 2018-01-29 17:36:43 +00:00
Frontend Fixed test in prior build where FileCheck tried to match against 2018-06-20 19:34:05 +00:00
Headers Add a test to verify the x86 intrinsic headers compile cleanly with no warnings or errors. 2018-06-20 01:05:09 +00:00
Import [ASTImporter] Properly import SourceLocations of Attrs 2018-05-08 12:45:21 +00:00
Index Fix line endings in recently updated test file 2018-06-21 12:39:24 +00:00
Integration
Layout [Sema] Fix incorrect packed aligned structure layout 2018-05-21 14:28:43 +00:00
Lexer P0096R5, P0941R2: Update to match latest feature test macro specification. 2018-06-14 00:40:20 +00:00
Misc Re-land "[LTO] Enable module summary emission by default for regular LTO" 2018-06-22 20:23:21 +00:00
Modules Re-apply: Warning for framework headers using double quote includes 2018-06-22 18:05:17 +00:00
OpenMP [OPENMP, NVPTX] Fix reduction of the big data types/structures. 2018-06-22 19:10:38 +00:00
PCH Append new attributes to the end of an AttributeList. 2018-06-19 23:46:52 +00:00
Parser Append new attributes to the end of an AttributeList. 2018-06-19 23:46:52 +00:00
Preprocessor [hmaptool] Turn %hmaptool into a proper substitution 2018-06-22 09:46:40 +00:00
Profile
Refactor
Rewriter Reapply "[Parse] Use CapturedStmt for @finally on MSVC" 2018-06-08 00:30:00 +00:00
Sema [x86] Fix a tiny bug in my test case in r335309 by marking that we don't 2018-06-21 23:52:36 +00:00
SemaCUDA [CUDA][HIP] Allow CUDA __global__ functions to have amdgpu kernel attributes 2018-06-12 23:58:59 +00:00
SemaCXX [Sema] isValidCoroutineContext FIXME and citations 2018-06-23 18:01:02 +00:00
SemaObjC [Sema] -Wformat-pedantic only for NSInteger/NSUInteger %zu/%zi on Darwin 2018-06-22 21:54:40 +00:00
SemaObjCXX [Sema] Produce diagnostics for attribute 'trivial_abi' that appears 2018-06-19 05:04:44 +00:00
SemaOpenCL [OpenCL] Fixed parsing of address spaces for C++. 2018-06-22 16:20:21 +00:00
SemaOpenCLCXX [OpenCL] Support new/delete in Sema 2018-06-14 09:51:54 +00:00
SemaTemplate Append new attributes to the end of an AttributeList. 2018-06-19 23:46:52 +00:00
TableGen [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages. 2018-05-19 03:12:04 +00:00
Templight [Templight] Template Instantiation Observer 2018-02-10 14:04:45 +00:00
Tooling Fix test clang-diff-json.cpp 2018-02-10 21:28:55 +00:00
Unit
VFS [vfs] Don't bail out after a missing -ivfsoverlay file 2018-03-23 17:37:27 +00:00
clang-rename
.clang-format
CMakeLists.txt Re-apply: Add python tool to dump and construct header maps 2018-06-21 21:45:24 +00:00
TestRunner.sh
cxx-sections.data
lit.cfg.py Reinstate quotes around the path to python that I accidentaly removed in r335330 2018-06-22 20:03:32 +00:00
lit.site.cfg.py.in Remove unused lit setting, see https://reviews.llvm.org/D46619 2018-05-09 12:38:51 +00:00
make_test_dirs.pl