Enrico Granata | f509c5e | 2013-01-28 23:47:25 +0000 | [diff] [blame] | 1 | //===-- TypeFormat.cpp ----------------------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
Matt Kopec | fe21d4f | 2013-02-21 23:55:31 +0000 | [diff] [blame] | 10 | #include "lldb/lldb-python.h" |
| 11 | |
Enrico Granata | f509c5e | 2013-01-28 23:47:25 +0000 | [diff] [blame] | 12 | // C Includes |
| 13 | |
| 14 | // C++ Includes |
| 15 | |
| 16 | // Other libraries and framework includes |
| 17 | |
| 18 | // Project includes |
| 19 | #include "lldb/lldb-public.h" |
| 20 | #include "lldb/lldb-enumerations.h" |
| 21 | |
| 22 | #include "lldb/Core/Debugger.h" |
| 23 | #include "lldb/Core/StreamString.h" |
| 24 | #include "lldb/Core/Timer.h" |
| 25 | #include "lldb/DataFormatters/TypeFormat.h" |
| 26 | #include "lldb/Interpreter/CommandInterpreter.h" |
| 27 | #include "lldb/Symbol/ClangASTType.h" |
| 28 | #include "lldb/Target/StackFrame.h" |
| 29 | #include "lldb/Target/Target.h" |
| 30 | |
| 31 | using namespace lldb; |
| 32 | using namespace lldb_private; |
| 33 | |
| 34 | TypeFormatImpl::TypeFormatImpl (lldb::Format f, |
| 35 | const Flags& flags) : |
| 36 | m_flags(flags), |
| 37 | m_format (f) |
| 38 | { |
| 39 | } |
| 40 | |
| 41 | std::string |
| 42 | TypeFormatImpl::GetDescription() |
| 43 | { |
| 44 | StreamString sstr; |
| 45 | sstr.Printf ("%s%s%s%s\n", |
| 46 | FormatManager::GetFormatAsCString (GetFormat()), |
| 47 | Cascades() ? "" : " (not cascading)", |
| 48 | SkipsPointers() ? " (skip pointers)" : "", |
| 49 | SkipsReferences() ? " (skip references)" : ""); |
| 50 | return sstr.GetString(); |
| 51 | } |
| 52 | |