clang API Documentation
00001 //===--- Action.cpp - Implement the Action class --------------------------===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file implements the Action interface. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #include "clang/Sema/Action.h" 00015 #include "clang/Sema/DeclSpec.h" 00016 #include "clang/Sema/Scope.h" 00017 #include "clang/Basic/TargetInfo.h" 00018 #include "llvm/Support/Allocator.h" 00019 #include "llvm/Support/RecyclingAllocator.h" 00020 #include "llvm/Support/raw_ostream.h" 00021 using namespace clang; 00022 00023 void PrettyStackTraceActionsDecl::print(llvm::raw_ostream &OS) const { 00024 if (Loc.isValid()) { 00025 Loc.print(OS, SM); 00026 OS << ": "; 00027 } 00028 OS << Message; 00029 00030 std::string Name = Actions.getDeclName(TheDecl); 00031 if (!Name.empty()) 00032 OS << " '" << Name << '\''; 00033 00034 OS << '\n'; 00035 } 00036 00037 /// Out-of-line virtual destructor to provide home for Action class. 00038 Action::~Action() {}