================
@@ -1834,6 +1834,14 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions 
&Opts, ArgList &Args,
     Opts.setInlining(CodeGenOptions::NormalInlining);
   }
 
+  // If we have specified -Og and have not explicitly set 
-fno-extend-lifetimes,
+  // then default to -fextend-lifetimes.
+  if (Arg *A = Args.getLastArg(options::OPT_O_Group);
+      A && A->containsValue("g")) {
----------------
SLTozer wrote:

Is there an advantage to having it passed through the driver? I ask mainly 
because I see `-fextend-lifetimes` as being a feature of `-Og` optimization, 
and if you invoke `clang -cc1 -Og` directly then you'd expect/hope that the 
optimization behaviour would be the same as `clang -Og` - I'm not too familiar 
with expected Clang behaviour though, so if this is quite normal for 
driver/frontend behaviour then I'm fine to switch it.

https://github.com/llvm/llvm-project/pull/118026
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to