blob: 1df0e01a741a53624a67bdf39d2a42581e5c73c9 [file] [log] [blame]
Douglas Gregor87c30072010-07-26 04:08:02 +00001//===--- Action.cpp - Implement the Action class --------------------------===//
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// This file implements the Action interface.
11//
12//===----------------------------------------------------------------------===//
13
John McCalld226f652010-08-21 09:40:31 +000014#include "clang/Sema/Action.h"
John McCall19510852010-08-20 18:27:03 +000015#include "clang/Sema/DeclSpec.h"
16#include "clang/Sema/Scope.h"
Douglas Gregor87c30072010-07-26 04:08:02 +000017#include "clang/Basic/TargetInfo.h"
18#include "llvm/Support/Allocator.h"
19#include "llvm/Support/RecyclingAllocator.h"
20#include "llvm/Support/raw_ostream.h"
21using namespace clang;
22
23void PrettyStackTraceActionsDecl::print(llvm::raw_ostream &OS) const {
24 if (Loc.isValid()) {
25 Loc.print(OS, SM);
26 OS << ": ";
27 }
28 OS << Message;
29
30 std::string Name = Actions.getDeclName(TheDecl);
31 if (!Name.empty())
32 OS << " '" << Name << '\'';
33
34 OS << '\n';
35}
36
Douglas Gregor87c30072010-07-26 04:08:02 +000037/// Out-of-line virtual destructor to provide home for Action class.
38Action::~Action() {}