[cfe-commits] PATCH: Use enum to set size of debug info generated by Clang

Eric Christopher echristo at apple.com
Thu Apr 26 10:28:30 PDT 2012


On Apr 26, 2012, at 4:15 AM, Alexey Samsonov <samsonov at google.com> wrote:

> Hi, cfe-commits!
> 
> This patch follows clattner's advice and introduces enum (instead of bool flags)
> that defines the size of debug info generated by Clang. This patch doesn't
> change the behavior and is a first step to introducing -gline-tables-only flag
> http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120423/056674.html
> 
> http://codereview.appspot.com/6114059/

Like Chandler, I just have a few nits:

-  if (DI && CGF.CGM.getCodeGenOpts().LimitDebugInfo) {
+  if (DI && CGF.CGM.getCodeGenOpts().DebugInfo ==
+            CodeGenOptions::LimitedDebugInfo) {

for flow I'd probably prefer to see this written:

if (DI &&
    CGF.CGM.getCodeGenOpts().DebugInfo == CodeGenOptions::LimitedDebugInfo)

if it fits. If not, ignore me :)

-  if (DI && CGM.getCodeGenOpts().LimitDebugInfo) {
+  if (DI && CGM.getCodeGenOpts().DebugInfo ==
+            CodeGenOptions::LimitedDebugInfo) {

Ditto.

Thanks!

-eric



More information about the cfe-commits mailing list