Douglas Gregor | 87c3007 | 2010-07-26 04:08:02 +0000 | [diff] [blame] | 1 | //===--- 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 McCall | d226f65 | 2010-08-21 09:40:31 +0000 | [diff] [blame] | 14 | #include "clang/Sema/Action.h" |
John McCall | 1951085 | 2010-08-20 18:27:03 +0000 | [diff] [blame] | 15 | #include "clang/Sema/DeclSpec.h" |
| 16 | #include "clang/Sema/Scope.h" |
Douglas Gregor | 87c3007 | 2010-07-26 04:08:02 +0000 | [diff] [blame] | 17 | #include "clang/Basic/TargetInfo.h" |
| 18 | #include "llvm/Support/Allocator.h" |
| 19 | #include "llvm/Support/RecyclingAllocator.h" |
| 20 | #include "llvm/Support/raw_ostream.h" |
| 21 | using namespace clang; |
| 22 | |
| 23 | void 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 Gregor | 87c3007 | 2010-07-26 04:08:02 +0000 | [diff] [blame] | 37 | /// Out-of-line virtual destructor to provide home for Action class. |
| 38 | Action::~Action() {} |