]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - contrib/llvm/tools/lldb/source/DataFormatters/TypeFormat.cpp
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.git] / contrib / llvm / tools / lldb / source / DataFormatters / TypeFormat.cpp
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
10 #include "lldb/lldb-python.h"
11
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