llvm-project/clang/lib/Sema/Action.cpp

39 lines
1.1 KiB
C++
Raw Normal View History

//===--- 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"
#include "clang/Sema/DeclSpec.h"
#include "clang/Sema/Scope.h"
#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() {}