MaskRay added inline comments.

================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:7966
   }
+  unsigned DwarfVersion = GetDwarfVersion(getToolChain(), Args);
   RenderDebugEnablingArgs(Args, CmdArgs, DebugInfoKind, DwarfVersion,
----------------
Consider `const` if this variable is not modified.


================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.h:114
+const llvm::opt::Arg *getDwarfNArg(const llvm::opt::ArgList &Args);
+unsigned GetDwarfVersion(const ToolChain &TC, const llvm::opt::ArgList &Args);
 
----------------
If this patch touches all use cases of `GetDwarfVersion`, consider switching 
the case to `getDwarfVersion`.


================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:979
+      unsigned DwarfVersion = GetDwarfVersion(getToolChain(), Args);
+      std::string DV = "-gdwarf-" + std::to_string(DwarfVersion);
+      CmdArgs.push_back(Args.MakeArgString(DV));
----------------
MakeArgString accepts a Twine. Just use `"-gdwarf-" + Twine(DwarfVersion);` as 
the argument.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136707/new/

https://reviews.llvm.org/D136707

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to