mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Use real types instead of "Self" for the IR value names of local type data.
Since that's somewhat expensive, allow the generation of meaningful IR value names to be efficiently controlled in IRGen. By default, enable meaningful value names only when generating .ll output. I considered giving protocol witness tables the name T:Protocol instead of T.Protocol, but decided that I didn't want to update that many test cases.
This commit is contained in:
@@ -1125,6 +1125,13 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
|
||||
Opts.LinkLibraries.push_back(LinkLibrary(A->getValue(), Kind));
|
||||
}
|
||||
|
||||
if (auto valueNames = Args.getLastArg(OPT_disable_llvm_value_names,
|
||||
OPT_enable_llvm_value_names)) {
|
||||
Opts.HasValueNamesSetting = true;
|
||||
Opts.ValueNames =
|
||||
valueNames->getOption().matches(OPT_enable_llvm_value_names);
|
||||
}
|
||||
|
||||
Opts.DisableLLVMOptzns |= Args.hasArg(OPT_disable_llvm_optzns);
|
||||
Opts.DisableLLVMARCOpts |= Args.hasArg(OPT_disable_llvm_arc_opts);
|
||||
Opts.DisableLLVMSLPVectorizer |= Args.hasArg(OPT_disable_llvm_slp_vectorizer);
|
||||
|
||||
Reference in New Issue
Block a user