Add an __lldb_init_module function so that importing the
lldbDataFormatters script automatically adds the formatters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209712 91177308-0d34-0410-b5e6-96231b3b80d8
This lets lldb give sane output for SmallVectors, e.g.
Before:
(lldb) p sv
(llvm::SmallVector<int, 10>) $0 = {
(llvm::SmallVectorImpl<int>) llvm::SmallVectorImpl<int> = {
(llvm::SmallVectorTemplateBase<int>) llvm::SmallVectorTemplateBase<int> = {
(llvm::SmallVectorTemplateCommon<int>) llvm::SmallVectorTemplateCommon<int> = {
(llvm::SmallVectorBase) llvm::SmallVectorBase = {
(void *) BeginX = 0x00007fff5fbff960
...
}
After:
(lldb) p sv
(llvm::SmallVector<int, 10>) $0 = {
(int) [0] = 42
(int) [1] = 23
...
}
The script is still a bit rough so expect crashes for vectors of complex types.
Synthetic children are _not_ available in xcode 4.2, newer LLDBs should work though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148308 91177308-0d34-0410-b5e6-96231b3b80d8