OSDN Git Service

Add the DataExtractor utility class.
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 13 Sep 2011 19:42:16 +0000 (19:42 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 13 Sep 2011 19:42:16 +0000 (19:42 +0000)
commit8c74f7f2991a10977fd5a003b2901b56eb2e19a8
treee9c25ae260bcc06a6bbd5cd8c2fddd316352a1cc
parentdf24e1fb0812edd2bd33a3b279edb030dd30023d
Add the DataExtractor utility class.

It is an endian-aware helper that can read data from a StringRef. It will
come in handy for DWARF parsing. This class is inspired by LLDB's
DataExtractor, but is stripped down to the bare minimum needed for DWARF.

Comes with unit tests!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139626 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/DataExtractor.h [new file with mode: 0644]
lib/Support/CMakeLists.txt
lib/Support/DataExtractor.cpp [new file with mode: 0644]
unittests/Support/DataExtractorTest.cpp [new file with mode: 0644]