This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Support -gdwarf64 for assembly files
ClosedPublic

Authored by ikudrin on Feb 16 2021, 6:40 AM.

Details

Summary

The option was added in D90507 for C/C++ source files. This patch adds support for assembly files.

Diff Detail

Event Timeline

ikudrin created this revision.Feb 16 2021, 6:40 AM
ikudrin requested review of this revision.Feb 16 2021, 6:40 AM
MaskRay accepted this revision.Feb 16 2021, 9:32 AM
This revision is now accepted and ready to land.Feb 16 2021, 9:32 AM
dblaikie accepted this revision.Feb 16 2021, 10:43 AM

Looks good to me - thanks

clang/lib/Driver/ToolChains/Clang.cpp
3757–3771

Could simplify this with an early return:

if (!DwarfFormatArg)
  return;
...

So DwarfFormatArg isn't tested twice/reduces indentation/etc.

clang/tools/driver/cc1as_main.cpp
237

No need for the ? 1 : 0, that's what booleans convert to anyway. (unless there's prior art/other instances of this idiom in this file that this is consistent with)

ikudrin marked 2 inline comments as done.Feb 16 2021, 10:38 PM
ikudrin added inline comments.
clang/lib/Driver/ToolChains/Clang.cpp
3757–3771

Thanks! I'll update that on commit.

clang/tools/driver/cc1as_main.cpp
237

Thanks! I'll apply the suggestion on commit, too.

This revision was automatically updated to reflect the committed changes.
ikudrin marked 2 inline comments as done.