Skip to content
Snippets Groups Projects
Commit 3b75c09e authored by Richard Smith's avatar Richard Smith
Browse files

[modules] Don't emit initializers for VarDecls within a module eagerly whenever

we first touch any part of that module. Instead, defer them until the first
time that module is (transitively) imported. The initializer step for a module
then recursively initializes modules that its own headers imported.

For example, this avoids running the <iostream> global initializer in programs
that don't actually use iostreams, but do use other parts of the standard
library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276159 91177308-0d34-0410-b5e6-96231b3b80d8
parent bb573cbb
No related branches found
No related tags found
Loading
Showing
with 229 additions and 39 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment