From 39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 20 Feb 2011 13:06:31 +0000 Subject: Vendor import of clang trunk r126079: http://llvm.org/svn/llvm-project/cfe/trunk@126079 --- include/clang/AST/FullExpr.h | 88 -------------------------------------------- 1 file changed, 88 deletions(-) delete mode 100644 include/clang/AST/FullExpr.h (limited to 'include/clang/AST/FullExpr.h') diff --git a/include/clang/AST/FullExpr.h b/include/clang/AST/FullExpr.h deleted file mode 100644 index 6ceefed..0000000 --- a/include/clang/AST/FullExpr.h +++ /dev/null @@ -1,88 +0,0 @@ -//===--- FullExpr.h - C++ full expression class -----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the FullExpr interface, to be used for type safe handling -// of full expressions. -// -// Full expressions are described in C++ [intro.execution]p12. -// -//===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_AST_FULLEXPR_H -#define LLVM_CLANG_AST_FULLEXPR_H - -#include "llvm/ADT/PointerUnion.h" - -namespace clang { - class ASTContext; - class CXXTemporary; - class Expr; - -class FullExpr { - struct ExprAndTemporaries { - Expr *SubExpr; - - unsigned NumTemps; - - typedef CXXTemporary** temps_iterator; - - temps_iterator temps_begin() { - return reinterpret_cast(this + 1); - } - temps_iterator temps_end() { - return temps_begin() + NumTemps; - } - }; - - typedef llvm::PointerUnion SubExprTy; - SubExprTy SubExpr; - - FullExpr() { } - -public: - static FullExpr Create(ASTContext &Context, Expr *SubExpr, - CXXTemporary **Temps, unsigned NumTemps); - - Expr *getExpr() { - if (Expr *E = SubExpr.dyn_cast()) - return E; - - return SubExpr.get()->SubExpr; - } - - const Expr *getExpr() const { - return const_cast(this)->getExpr(); - } - - typedef CXXTemporary** temps_iterator; - - temps_iterator temps_begin() { - if (ExprAndTemporaries *ET = SubExpr.dyn_cast()) - return ET->temps_begin(); - - return 0; - } - temps_iterator temps_end() { - if (ExprAndTemporaries *ET = SubExpr.dyn_cast()) - return ET->temps_end(); - - return 0; - } - - void *getAsOpaquePtr() const { return SubExpr.getOpaqueValue(); } - - static FullExpr getFromOpaquePtr(void *Ptr) { - FullExpr E; - E.SubExpr = SubExprTy::getFromOpaqueValue(Ptr); - return E; - } -}; - -} // end namespace clang - -#endif -- cgit v1.1