llvm-project/clang
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
..
INPUTS
bindings [bindings] Fix most Python binding unittests on Windows 2018-06-21 20:07:03 +00:00
cmake [Fuchsia] Enable static libc++, libc++abi, libunwind 2018-06-23 03:15:07 +00:00
docs ASan docs: no_sanitize("address") works on globals. 2018-06-21 00:16:32 +00:00
examples clang-interpreter: Add missing LLVM component Object 2018-06-03 08:12:15 +00:00
include [clang-cl] Don't emit dllexport inline functions etc. from pch files (PR37801) 2018-06-25 13:23:49 +00:00
lib [clang-cl] Don't emit dllexport inline functions etc. from pch files (PR37801) 2018-06-25 13:23:49 +00:00
runtime [clang] Use add_llvm_install_targets 2017-11-30 22:35:02 +00:00
test [clang-cl] Don't emit dllexport inline functions etc. from pch files (PR37801) 2018-06-25 13:23:49 +00:00
tools Attempt to fix latent tablegen dependency issue 2018-06-23 17:32:51 +00:00
unittests [ASTImporter] Add ms compatibility to tests which use the TestBase 2018-06-25 13:04:37 +00:00
utils Re-apply: Add python tool to dump and construct header maps 2018-06-21 21:45:24 +00:00
www P0096R5, P0941R2: Update to match latest feature test macro specification. 2018-06-14 00:40:20 +00:00
.arcconfig [clang] Set up .arcconfig to point to new Diffusion C repository 2017-11-27 17:21:24 +00:00
.clang-format
.clang-tidy Backport changes from llvm/.clang_tidy to clang/.clang_tidy configs 2018-03-20 14:39:12 +00:00
.gitignore
CMakeLists.txt Re-apply: Add python tool to dump and construct header maps 2018-06-21 21:45:24 +00:00
CODE_OWNERS.TXT Change code owner for Clang Static Analyzer to Devin Coughlin. 2017-11-17 23:19:04 +00:00
INSTALL.txt
LICENSE.TXT Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
ModuleInfo.txt
NOTES.txt
README.txt

README.txt

//===----------------------------------------------------------------------===//
// C Language Family Front-end
//===----------------------------------------------------------------------===//

Welcome to Clang.  This is a compiler front-end for the C family of languages
(C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM
compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things
beyond just compiling code: we intend for Clang to be host to a number of
different source-level tools.  One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read
the relevant web sites.  Here are some pointers:

Information on Clang:             http://clang.llvm.org/
Building and using Clang:         http://clang.llvm.org/get_started.html
Clang Static Analyzer:            http://clang-analyzer.llvm.org/
Information on the LLVM project:  http://llvm.org/

If you have questions or comments about Clang, a great place to discuss them is
on the Clang development mailing list:
  http://lists.llvm.org/mailman/listinfo/cfe-dev

If you find a bug in Clang, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/