2010-07-26 12:08:02 +08:00
|
|
|
//===--- Action.cpp - Implement the Action class --------------------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file implements the Action interface.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2010-08-21 17:40:31 +08:00
|
|
|
#include "clang/Sema/Action.h"
|
2010-08-21 02:27:03 +08:00
|
|
|
#include "clang/Sema/DeclSpec.h"
|
|
|
|
#include "clang/Sema/Scope.h"
|
2010-07-26 12:08:02 +08:00
|
|
|
#include "clang/Basic/TargetInfo.h"
|
|
|
|
#include "llvm/Support/Allocator.h"
|
|
|
|
#include "llvm/Support/RecyclingAllocator.h"
|
|
|
|
#include "llvm/Support/raw_ostream.h"
|
|
|
|
using namespace clang;
|
|
|
|
|
|
|
|
void PrettyStackTraceActionsDecl::print(llvm::raw_ostream &OS) const {
|
|
|
|
if (Loc.isValid()) {
|
|
|
|
Loc.print(OS, SM);
|
|
|
|
OS << ": ";
|
|
|
|
}
|
|
|
|
OS << Message;
|
|
|
|
|
|
|
|
std::string Name = Actions.getDeclName(TheDecl);
|
|
|
|
if (!Name.empty())
|
|
|
|
OS << " '" << Name << '\'';
|
|
|
|
|
|
|
|
OS << '\n';
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Out-of-line virtual destructor to provide home for Action class.
|
|
|
|
Action::~Action() {}
|