Revise the implementation logic of sized deallocation: Do not automatically generate weak definitions of the sized operator delete (in terms of unsized operator delete). Instead, provide the funcitonality via a new compiler flag, -fdef-sized-delete.
The current implementation causes link-time ODR violations when the delete symbols are exported into the dynamic table. llvm-svn: 229241
This commit is contained in:
@@ -1525,6 +1525,8 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
|
||||
Opts.NoMathBuiltin = Args.hasArg(OPT_fno_math_builtin);
|
||||
Opts.AssumeSaneOperatorNew = !Args.hasArg(OPT_fno_assume_sane_operator_new);
|
||||
Opts.SizedDeallocation |= Args.hasArg(OPT_fsized_deallocation);
|
||||
Opts.DefaultSizedDelete = Opts.SizedDeallocation &&
|
||||
Args.hasArg(OPT_fdef_sized_delete);
|
||||
Opts.HeinousExtensions = Args.hasArg(OPT_fheinous_gnu_extensions);
|
||||
Opts.AccessControl = !Args.hasArg(OPT_fno_access_control);
|
||||
Opts.ElideConstructors = !Args.hasArg(OPT_fno_elide_constructors);
|
||||
|
||||
Reference in New Issue
Block a user