summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/Action.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-08-20 18:27:03 +0000
committerJohn McCall <rjmccall@apple.com>2010-08-20 18:27:03 +0000
commit8b0666cf7910b9a10f57af8b5597a61e67fe8e89 (patch)
treece1c9bee64b70777200c85581ef5307f9434e3e5 /clang/lib/Parse/Action.cpp
parentb145bbaf4b8b7d3ea0997d43d3f1bc65085a6ece (diff)
downloadbcm5719-llvm-8b0666cf7910b9a10f57af8b5597a61e67fe8e89.tar.gz
bcm5719-llvm-8b0666cf7910b9a10f57af8b5597a61e67fe8e89.zip
Another step in the process of making the parser depend on Sema:
- move DeclSpec &c into the Sema library - move ParseAST into the Parse library Reflect this change in a thousand different includes. Reflect this change in the link orders. llvm-svn: 111667
Diffstat (limited to 'clang/lib/Parse/Action.cpp')
-rw-r--r--clang/lib/Parse/Action.cpp104
1 files changed, 0 insertions, 104 deletions
diff --git a/clang/lib/Parse/Action.cpp b/clang/lib/Parse/Action.cpp
deleted file mode 100644
index b34d14f50a0..00000000000
--- a/clang/lib/Parse/Action.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-//===--- 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.
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/Parse/Parser.h"
-#include "clang/Parse/DeclSpec.h"
-#include "clang/Parse/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 ActionBase class.
-ActionBase::~ActionBase() {}
-
-/// Out-of-line virtual destructor to provide home for Action class.
-Action::~Action() {}
-
-Action::ObjCMessageKind Action::getObjCMessageKind(Scope *S,
- IdentifierInfo *Name,
- SourceLocation NameLoc,
- bool IsSuper,
- bool HasTrailingDot,
- TypeTy *&ReceiverType) {
- ReceiverType = 0;
-
- if (IsSuper && !HasTrailingDot && S->isInObjcMethodScope())
- return ObjCSuperMessage;
-
- if (TypeTy *TyName = getTypeName(*Name, NameLoc, S)) {
- DeclSpec DS;
- const char *PrevSpec = 0;
- unsigned DiagID = 0;
- if (!DS.SetTypeSpecType(DeclSpec::TST_typename, NameLoc, PrevSpec,
- DiagID, TyName)) {
- DS.SetRangeEnd(NameLoc);
- Declarator DeclaratorInfo(DS, Declarator::TypeNameContext);
- TypeResult Ty = ActOnTypeName(S, DeclaratorInfo);
- if (!Ty.isInvalid())
- ReceiverType = Ty.get();
- }
- return ObjCClassMessage;
- }
-
- return ObjCInstanceMessage;
-}
-
-// Defined out-of-line here because of dependecy on AttributeList
-Action::DeclPtrTy Action::ActOnUsingDirective(Scope *CurScope,
- SourceLocation UsingLoc,
- SourceLocation NamespcLoc,
- CXXScopeSpec &SS,
- SourceLocation IdentLoc,
- IdentifierInfo *NamespcName,
- AttributeList *AttrList) {
-
- // FIXME: Parser seems to assume that Action::ActOn* takes ownership over
- // passed AttributeList, however other actions don't free it, is it
- // temporary state or bug?
- delete AttrList;
- return DeclPtrTy();
-}
-
-// Defined out-of-line here because of dependency on AttributeList
-Action::DeclPtrTy Action::ActOnUsingDeclaration(Scope *CurScope,
- AccessSpecifier AS,
- bool HasUsingKeyword,
- SourceLocation UsingLoc,
- CXXScopeSpec &SS,
- UnqualifiedId &Name,
- AttributeList *AttrList,
- bool IsTypeName,
- SourceLocation TypenameLoc) {
-
- // FIXME: Parser seems to assume that Action::ActOn* takes ownership over
- // passed AttributeList, however other actions don't free it, is it
- // temporary state or bug?
- delete AttrList;
- return DeclPtrTy();
-}
OpenPOWER on IntegriCloud