blob: 279704f2af12423146030e4374e5c73c36a14627 [file] [log] [blame]
Enrico Granataf509c5e2013-01-28 23:47:25 +00001//===-- 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 Kopecfe21d4f2013-02-21 23:55:31 +000010#include "lldb/lldb-python.h"
11
Enrico Granataf509c5e2013-01-28 23:47:25 +000012// 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
31using namespace lldb;
32using namespace lldb_private;
33
34TypeFormatImpl::TypeFormatImpl (lldb::Format f,
35 const Flags& flags) :
36m_flags(flags),
37m_format (f)
38{
39}
40
41std::string
42TypeFormatImpl::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