mirror of
https://github.com/intel/llvm.git
synced 2026-01-24 17:01:00 +08:00
Add -fdelayed-template-parsing option. Using this option all templated function definitions are parsed at the end of the translation unit only if it is required by an actual instantiation. As such all the symbols of the TU are available during name lookup.
Using this flag is necessary for compatibility with Microsoft template code. This also provides some parsing speed improvement. llvm-svn: 130022
This commit is contained in:
@@ -1605,6 +1605,12 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
||||
options::OPT_fno_borland_extensions, false))
|
||||
CmdArgs.push_back("-fborland-extensions");
|
||||
|
||||
// -fno-delayed-template-parsing is default.
|
||||
if (Args.hasFlag(options::OPT_fdelayed_template_parsing,
|
||||
options::OPT_fno_delayed_template_parsing,
|
||||
false))
|
||||
CmdArgs.push_back("-fdelayed-template-parsing");
|
||||
|
||||
// -fgnu-keywords default varies depending on language; only pass if
|
||||
// specified.
|
||||
if (Arg *A = Args.getLastArg(options::OPT_fgnu_keywords,
|
||||
|
||||
Reference in New Issue
Block a user