[PATCH] D27326: Make a DWARF generator so we can unit test DWARF APIs with gtest.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 5 17:21:36 PST 2016


On Mon, Dec 5, 2016 at 3:59 PM Greg Clayton via Phabricator <
reviews at reviews.llvm.org> wrote:

> clayborg updated this revision to Diff 80340.
> clayborg added a comment.
>
> Fixed Adrian's issues. Big changes include:
>
> - Added llvm::Expected support to the dwarfgen::Generator
> - Handle errors if any arise
> - Get host triple and get its 32 and 64 bits variants for 4 byte and 8
> byte addresses and bail out if targets are not available without breaking
> the gtest.
>

It's possible to build the compiler without support for the host
architecture, I should think...

It's probably simpler/OK (open to debate/disagreement, for sure) hardcode
some architecture and use lit test config to opt out of running these tests
unless that target is built in. (lots of our lit tests do this because they
test some specific architecture feature - not sure if any of the unit tests
do, though, os that might be a bit trickier)


>
>
> https://reviews.llvm.org/D27326
>
> Files:
>   include/llvm/CodeGen/DIE.h
>   include/llvm/CodeGen/DIEValue.def
>   include/llvm/DebugInfo/DWARF/DWARFDebugInfoEntry.h
>   include/llvm/MC/MCContext.h
>   lib/CodeGen/AsmPrinter/DIE.cpp
>   lib/CodeGen/AsmPrinter/DIEHash.cpp
>   lib/CodeGen/AsmPrinter/DwarfFile.cpp
>   lib/CodeGen/AsmPrinter/DwarfFile.h
>   lib/CodeGen/CMakeLists.txt
>   lib/CodeGen/DwarfGenerator.cpp
>   lib/CodeGen/DwarfGenerator.h
>   lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp
>   unittests/DebugInfo/DWARF/CMakeLists.txt
>   unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161206/154a418c/attachment.html>


More information about the llvm-commits mailing list