[cfe-commits] r54605 - in /cfe/trunk: Driver/ include/clang/AST/ include/clang/Parse/ lib/AST/ lib/Analysis/ lib/CodeGen/ lib/Parse/ lib/Sema/
Chris Lattner
sabre at nondot.org
Sat Aug 9 18:53:14 PDT 2008
Author: lattner
Date: Sat Aug 9 20:53:14 2008
New Revision: 54605
URL: http://llvm.org/viewvc/llvm-project?rev=54605&view=rev
Log:
rename PreDefinedExpr -> PredefinedExpr
Modified:
cfe/trunk/Driver/PrintParserCallbacks.cpp
cfe/trunk/Driver/RewriteObjC.cpp
cfe/trunk/include/clang/AST/Expr.h
cfe/trunk/include/clang/AST/StmtNodes.def
cfe/trunk/include/clang/Parse/Action.h
cfe/trunk/lib/AST/Expr.cpp
cfe/trunk/lib/AST/StmtDumper.cpp
cfe/trunk/lib/AST/StmtPrinter.cpp
cfe/trunk/lib/AST/StmtSerialization.cpp
cfe/trunk/lib/Analysis/CheckObjCDealloc.cpp
cfe/trunk/lib/CodeGen/CGExpr.cpp
cfe/trunk/lib/CodeGen/CGExprScalar.cpp
cfe/trunk/lib/CodeGen/CGObjC.cpp
cfe/trunk/lib/CodeGen/CodeGenFunction.h
cfe/trunk/lib/Parse/ParseExpr.cpp
cfe/trunk/lib/Sema/Sema.h
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/lib/Sema/SemaExpr.cpp
cfe/trunk/lib/Sema/SemaExprCXX.cpp
cfe/trunk/lib/Sema/SemaExprObjC.cpp
Modified: cfe/trunk/Driver/PrintParserCallbacks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/PrintParserCallbacks.cpp?rev=54605&r1=54604&r2=54605&view=diff
==============================================================================
--- cfe/trunk/Driver/PrintParserCallbacks.cpp (original)
+++ cfe/trunk/Driver/PrintParserCallbacks.cpp Sat Aug 9 20:53:14 2008
@@ -403,7 +403,7 @@
return 0;
}
- virtual ExprResult ActOnPreDefinedExpr(SourceLocation Loc,
+ virtual ExprResult ActOnPredefinedExpr(SourceLocation Loc,
tok::TokenKind Kind) {
llvm::cout << __FUNCTION__ << "\n";
return 0;
Modified: cfe/trunk/Driver/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/RewriteObjC.cpp?rev=54605&r1=54604&r2=54605&view=diff
==============================================================================
--- cfe/trunk/Driver/RewriteObjC.cpp (original)
+++ cfe/trunk/Driver/RewriteObjC.cpp Sat Aug 9 20:53:14 2008
@@ -1941,8 +1941,8 @@
// check if we are sending a message to 'super'
if (!CurMethodDecl || !CurMethodDecl->isInstance()) return 0;
- if (PreDefinedExpr *PDE = dyn_cast<PreDefinedExpr>(recExpr))
- if (PDE->getIdentType() == PreDefinedExpr::ObjCSuper) {
+ if (PredefinedExpr *PDE = dyn_cast<PredefinedExpr>(recExpr))
+ if (PDE->getIdentType() == PredefinedExpr::ObjCSuper) {
const PointerType *PT = PDE->getType()->getAsPointerType();
assert(PT);
ObjCInterfaceType *IT = cast<ObjCInterfaceType>(PT->getPointeeType());
Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=54605&r1=54604&r2=54605&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Sat Aug 9 20:53:14 2008
@@ -229,8 +229,8 @@
static DeclRefExpr* CreateImpl(llvm::Deserializer& D, ASTContext& C);
};
-/// PreDefinedExpr - [C99 6.4.2.2] - A pre-defined identifier such as __func__.
-class PreDefinedExpr : public Expr {
+/// PredefinedExpr - [C99 6.4.2.2] - A predefined identifier such as __func__.
+class PredefinedExpr : public Expr {
public:
enum IdentType {
Func,
@@ -244,24 +244,24 @@
SourceLocation Loc;
IdentType Type;
public:
- PreDefinedExpr(SourceLocation l, QualType type, IdentType IT)
- : Expr(PreDefinedExprClass, type), Loc(l), Type(IT) {}
+ PredefinedExpr(SourceLocation l, QualType type, IdentType IT)
+ : Expr(PredefinedExprClass, type), Loc(l), Type(IT) {}
IdentType getIdentType() const { return Type; }
virtual SourceRange getSourceRange() const { return SourceRange(Loc); }
static bool classof(const Stmt *T) {
- return T->getStmtClass() == PreDefinedExprClass;
+ return T->getStmtClass() == PredefinedExprClass;
}
- static bool classof(const PreDefinedExpr *) { return true; }
+ static bool classof(const PredefinedExpr *) { return true; }
// Iterators
virtual child_iterator child_begin();
virtual child_iterator child_end();
virtual void EmitImpl(llvm::Serializer& S) const;
- static PreDefinedExpr* CreateImpl(llvm::Deserializer& D, ASTContext& C);
+ static PredefinedExpr* CreateImpl(llvm::Deserializer& D, ASTContext& C);
};
class IntegerLiteral : public Expr {
Modified: cfe/trunk/include/clang/AST/StmtNodes.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/StmtNodes.def?rev=54605&r1=54604&r2=54605&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/StmtNodes.def (original)
+++ cfe/trunk/include/clang/AST/StmtNodes.def Sat Aug 9 20:53:14 2008
@@ -58,7 +58,7 @@
FIRST_EXPR(31)
// Expressions.
STMT(31, Expr , Stmt)
-STMT(32, PreDefinedExpr , Expr)
+STMT(32, PredefinedExpr , Expr)
STMT(33, DeclRefExpr , Expr)
STMT(34, IntegerLiteral , Expr)
STMT(35, FloatingLiteral , Expr)
Modified: cfe/trunk/include/clang/Parse/Action.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Action.h?rev=54605&r1=54604&r2=54605&view=diff
==============================================================================
--- cfe/trunk/include/clang/Parse/Action.h (original)
+++ cfe/trunk/include/clang/Parse/Action.h Sat Aug 9 20:53:14 2008
@@ -387,7 +387,7 @@
return 0;
}
- virtual ExprResult ActOnPreDefinedExpr(SourceLocation Loc,
+ virtual ExprResult ActOnPredefinedExpr(SourceLocation Loc,
tok::TokenKind Kind) {
return 0;
}
Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=54605&r1=54604&r2=54605&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Sat Aug 9 20:53:14 2008
@@ -439,9 +439,9 @@
return LV_Valid;
case ObjCPropertyRefExprClass: // FIXME: check if read-only property.
return LV_Valid;
- case PreDefinedExprClass:
- return (cast<PreDefinedExpr>(this)->getIdentType()
- == PreDefinedExpr::CXXThis
+ case PredefinedExprClass:
+ return (cast<PredefinedExpr>(this)->getIdentType()
+ == PredefinedExpr::CXXThis
? LV_InvalidExpression : LV_Valid);
case CXXDefaultArgExprClass:
return cast<CXXDefaultArgExpr>(this)->getExpr()->isLvalue(Ctx);
@@ -510,7 +510,7 @@
}
case ArraySubscriptExprClass:
return cast<ArraySubscriptExpr>(this)->getBase()->hasGlobalStorage();
- case PreDefinedExprClass:
+ case PredefinedExprClass:
return true;
case CXXDefaultArgExprClass:
return cast<CXXDefaultArgExpr>(this)->getExpr()->hasGlobalStorage();
@@ -1263,9 +1263,9 @@
Stmt::child_iterator ObjCSuperRefExpr::child_begin() { return child_iterator();}
Stmt::child_iterator ObjCSuperRefExpr::child_end() { return child_iterator(); }
-// PreDefinedExpr
-Stmt::child_iterator PreDefinedExpr::child_begin() { return child_iterator(); }
-Stmt::child_iterator PreDefinedExpr::child_end() { return child_iterator(); }
+// PredefinedExpr
+Stmt::child_iterator PredefinedExpr::child_begin() { return child_iterator(); }
+Stmt::child_iterator PredefinedExpr::child_end() { return child_iterator(); }
// IntegerLiteral
Stmt::child_iterator IntegerLiteral::child_begin() { return child_iterator(); }
Modified: cfe/trunk/lib/AST/StmtDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/StmtDumper.cpp?rev=54605&r1=54604&r2=54605&view=diff
==============================================================================
--- cfe/trunk/lib/AST/StmtDumper.cpp (original)
+++ cfe/trunk/lib/AST/StmtDumper.cpp Sat Aug 9 20:53:14 2008
@@ -116,7 +116,7 @@
// Exprs
void VisitExpr(Expr *Node);
void VisitDeclRefExpr(DeclRefExpr *Node);
- void VisitPreDefinedExpr(PreDefinedExpr *Node);
+ void VisitPredefinedExpr(PredefinedExpr *Node);
void VisitCharacterLiteral(CharacterLiteral *Node);
void VisitIntegerLiteral(IntegerLiteral *Node);
void VisitFloatingLiteral(FloatingLiteral *Node);
@@ -308,14 +308,14 @@
fprintf(F, " isFreeIvar");
}
-void StmtDumper::VisitPreDefinedExpr(PreDefinedExpr *Node) {
+void StmtDumper::VisitPredefinedExpr(PredefinedExpr *Node) {
DumpExpr(Node);
switch (Node->getIdentType()) {
default: assert(0 && "unknown case");
- case PreDefinedExpr::Func: fprintf(F, " __func__"); break;
- case PreDefinedExpr::Function: fprintf(F, " __FUNCTION__"); break;
- case PreDefinedExpr::PrettyFunction: fprintf(F, " __PRETTY_FUNCTION__");break;
- case PreDefinedExpr::ObjCSuper: fprintf(F, "super"); break;
+ case PredefinedExpr::Func: fprintf(F, " __func__"); break;
+ case PredefinedExpr::Function: fprintf(F, " __FUNCTION__"); break;
+ case PredefinedExpr::PrettyFunction: fprintf(F, " __PRETTY_FUNCTION__");break;
+ case PredefinedExpr::ObjCSuper: fprintf(F, "super"); break;
}
}
Modified: cfe/trunk/lib/AST/StmtPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/StmtPrinter.cpp?rev=54605&r1=54604&r2=54605&view=diff
==============================================================================
--- cfe/trunk/lib/AST/StmtPrinter.cpp (original)
+++ cfe/trunk/lib/AST/StmtPrinter.cpp Sat Aug 9 20:53:14 2008
@@ -496,20 +496,20 @@
// FIXME: OS << Node->getDecl()->getName();
}
-void StmtPrinter::VisitPreDefinedExpr(PreDefinedExpr *Node) {
+void StmtPrinter::VisitPredefinedExpr(PredefinedExpr *Node) {
switch (Node->getIdentType()) {
default:
assert(0 && "unknown case");
- case PreDefinedExpr::Func:
+ case PredefinedExpr::Func:
OS << "__func__";
break;
- case PreDefinedExpr::Function:
+ case PredefinedExpr::Function:
OS << "__FUNCTION__";
break;
- case PreDefinedExpr::PrettyFunction:
+ case PredefinedExpr::PrettyFunction:
OS << "__PRETTY_FUNCTION__";
break;
- case PreDefinedExpr::ObjCSuper:
+ case PredefinedExpr::ObjCSuper:
OS << "super";
break;
}
Modified: cfe/trunk/lib/AST/StmtSerialization.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/StmtSerialization.cpp?rev=54605&r1=54604&r2=54605&view=diff
==============================================================================
--- cfe/trunk/lib/AST/StmtSerialization.cpp (original)
+++ cfe/trunk/lib/AST/StmtSerialization.cpp Sat Aug 9 20:53:14 2008
@@ -130,8 +130,8 @@
case ParenExprClass:
return ParenExpr::CreateImpl(D, C);
- case PreDefinedExprClass:
- return PreDefinedExpr::CreateImpl(D, C);
+ case PredefinedExprClass:
+ return PredefinedExpr::CreateImpl(D, C);
case ReturnStmtClass:
return ReturnStmt::CreateImpl(D, C);
@@ -741,17 +741,17 @@
return new ParenExpr(L,R,val);
}
-void PreDefinedExpr::EmitImpl(Serializer& S) const {
+void PredefinedExpr::EmitImpl(Serializer& S) const {
S.Emit(Loc);
S.EmitInt(getIdentType());
S.Emit(getType());
}
-PreDefinedExpr* PreDefinedExpr::CreateImpl(Deserializer& D, ASTContext& C) {
+PredefinedExpr* PredefinedExpr::CreateImpl(Deserializer& D, ASTContext& C) {
SourceLocation Loc = SourceLocation::ReadVal(D);
IdentType it = static_cast<IdentType>(D.ReadInt());
QualType Q = QualType::ReadVal(D);
- return new PreDefinedExpr(Loc,Q,it);
+ return new PredefinedExpr(Loc,Q,it);
}
void ReturnStmt::EmitImpl(Serializer& S) const {
Modified: cfe/trunk/lib/Analysis/CheckObjCDealloc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CheckObjCDealloc.cpp?rev=54605&r1=54604&r2=54605&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CheckObjCDealloc.cpp (original)
+++ cfe/trunk/lib/Analysis/CheckObjCDealloc.cpp Sat Aug 9 20:53:14 2008
@@ -29,8 +29,8 @@
if (ObjCMessageExpr* ME = dyn_cast<ObjCMessageExpr>(S))
if (ME->getSelector() == Dealloc)
if (Expr* Receiver = ME->getReceiver()->IgnoreParenCasts())
- if (PreDefinedExpr* E = dyn_cast<PreDefinedExpr>(Receiver))
- if (E->getIdentType() == PreDefinedExpr::ObjCSuper)
+ if (PredefinedExpr* E = dyn_cast<PredefinedExpr>(Receiver))
+ if (E->getIdentType() == PredefinedExpr::ObjCSuper)
return true;
// Recurse to children.
Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=54605&r1=54604&r2=54605&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Sat Aug 9 20:53:14 2008
@@ -104,8 +104,8 @@
case Expr::CallExprClass: return EmitCallExprLValue(cast<CallExpr>(E));
case Expr::DeclRefExprClass: return EmitDeclRefLValue(cast<DeclRefExpr>(E));
case Expr::ParenExprClass:return EmitLValue(cast<ParenExpr>(E)->getSubExpr());
- case Expr::PreDefinedExprClass:
- return EmitPreDefinedLValue(cast<PreDefinedExpr>(E));
+ case Expr::PredefinedExprClass:
+ return EmitPredefinedLValue(cast<PredefinedExpr>(E));
case Expr::StringLiteralClass:
return EmitStringLiteralLValue(cast<StringLiteral>(E));
@@ -507,7 +507,7 @@
return LValue::MakeAddr(CGM.GetAddrOfConstantString(StringLiteral),0);
}
-LValue CodeGenFunction::EmitPreDefinedLValue(const PreDefinedExpr *E) {
+LValue CodeGenFunction::EmitPredefinedLValue(const PredefinedExpr *E) {
std::string FunctionName;
if(const FunctionDecl *FD = dyn_cast<FunctionDecl>(CurFuncDecl)) {
FunctionName = FD->getName();
@@ -520,13 +520,13 @@
switch (E->getIdentType()) {
default:
assert(0 && "unknown pre-defined ident type");
- case PreDefinedExpr::Func:
+ case PredefinedExpr::Func:
GlobalVarName = "__func__.";
break;
- case PreDefinedExpr::Function:
+ case PredefinedExpr::Function:
GlobalVarName = "__FUNCTION__.";
break;
- case PreDefinedExpr::PrettyFunction:
+ case PredefinedExpr::PrettyFunction:
// FIXME:: Demangle C++ method names
GlobalVarName = "__PRETTY_FUNCTION__.";
break;
Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=54605&r1=54604&r2=54605&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Sat Aug 9 20:53:14 2008
@@ -138,7 +138,7 @@
Value *VisitExtVectorElementExpr(Expr *E) { return EmitLoadOfLValue(E); }
Value *VisitCompoundLiteralExpr(CompoundLiteralExpr *E) { return EmitLoadOfLValue(E); }
Value *VisitStringLiteral(Expr *E) { return EmitLValue(E).getAddress(); }
- Value *VisitPreDefinedExpr(Expr *E) { return EmitLValue(E).getAddress(); }
+ Value *VisitPredefinedExpr(Expr *E) { return EmitLValue(E).getAddress(); }
Value *VisitInitListExpr(InitListExpr *E) {
unsigned NumInitElements = E->getNumInits();
Modified: cfe/trunk/lib/CodeGen/CGObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjC.cpp?rev=54605&r1=54604&r2=54605&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjC.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjC.cpp Sat Aug 9 20:53:14 2008
@@ -56,9 +56,9 @@
llvm::Value *ClassName = CGM.GetAddrOfConstantString(classname);
ClassName = Builder.CreateStructGEP(ClassName, 0);
Receiver = Runtime->LookupClass(Builder, ClassName);
- } else if (isa<PreDefinedExpr>(E->getReceiver())) {
- assert(cast<PreDefinedExpr>(E->getReceiver())->getIdentType() ==
- PreDefinedExpr::ObjCSuper);
+ } else if (const PredefinedExpr *PDE =
+ dyn_cast<PredefinedExpr>(E->getReceiver())) {
+ assert(PDE->getIdentType() == PredefinedExpr::ObjCSuper);
isSuperMessage = true;
Receiver = LoadObjCSelf();
} else {
Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=54605&r1=54604&r2=54605&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.h Sat Aug 9 20:53:14 2008
@@ -434,7 +434,7 @@
LValue EmitDeclRefLValue(const DeclRefExpr *E);
LValue EmitStringLiteralLValue(const StringLiteral *E);
- LValue EmitPreDefinedLValue(const PreDefinedExpr *E);
+ LValue EmitPredefinedLValue(const PredefinedExpr *E);
LValue EmitUnaryOpLValue(const UnaryOperator *E);
LValue EmitArraySubscriptExpr(const ArraySubscriptExpr *E);
LValue EmitExtVectorElementExpr(const ExtVectorElementExpr *E);
Modified: cfe/trunk/lib/Parse/ParseExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExpr.cpp?rev=54605&r1=54604&r2=54605&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseExpr.cpp (original)
+++ cfe/trunk/lib/Parse/ParseExpr.cpp Sat Aug 9 20:53:14 2008
@@ -466,7 +466,7 @@
case tok::kw___func__: // primary-expression: __func__ [C99 6.4.2.2]
case tok::kw___FUNCTION__: // primary-expression: __FUNCTION__ [GNU]
case tok::kw___PRETTY_FUNCTION__: // primary-expression: __P..Y_F..N__ [GNU]
- Res = Actions.ActOnPreDefinedExpr(Tok.getLocation(), SavedKind);
+ Res = Actions.ActOnPredefinedExpr(Tok.getLocation(), SavedKind);
ConsumeToken();
// These can be followed by postfix-expr pieces.
return ParsePostfixExpressionSuffix(Res);
Modified: cfe/trunk/lib/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.h?rev=54605&r1=54604&r2=54605&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/Sema.h (original)
+++ cfe/trunk/lib/Sema/Sema.h Sat Aug 9 20:53:14 2008
@@ -444,8 +444,8 @@
virtual ExprResult ActOnIdentifierExpr(Scope *S, SourceLocation Loc,
IdentifierInfo &II,
bool HasTrailingLParen);
- virtual ExprResult ActOnPreDefinedExpr(SourceLocation Loc,
- tok::TokenKind Kind);
+ virtual ExprResult ActOnPredefinedExpr(SourceLocation Loc,
+ tok::TokenKind Kind);
virtual ExprResult ActOnNumericConstant(const Token &);
virtual ExprResult ActOnCharacterConstant(const Token &);
virtual ExprResult ActOnParenExpr(SourceLocation L, SourceLocation R,
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=54605&r1=54604&r2=54605&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Sat Aug 9 20:53:14 2008
@@ -862,7 +862,7 @@
CheckArithmeticConstantExpression(ASE->getIdx());
}
case Expr::StringLiteralClass:
- case Expr::PreDefinedExprClass:
+ case Expr::PredefinedExprClass:
return false;
case Expr::UnaryOperatorClass: {
const UnaryOperator *Exp = cast<UnaryOperator>(Init);
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=54605&r1=54604&r2=54605&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Sat Aug 9 20:53:14 2008
@@ -397,15 +397,15 @@
abort();
}
-Sema::ExprResult Sema::ActOnPreDefinedExpr(SourceLocation Loc,
+Sema::ExprResult Sema::ActOnPredefinedExpr(SourceLocation Loc,
tok::TokenKind Kind) {
- PreDefinedExpr::IdentType IT;
+ PredefinedExpr::IdentType IT;
switch (Kind) {
default: assert(0 && "Unknown simple primary expr!");
- case tok::kw___func__: IT = PreDefinedExpr::Func; break; // [C99 6.4.2.2]
- case tok::kw___FUNCTION__: IT = PreDefinedExpr::Function; break;
- case tok::kw___PRETTY_FUNCTION__: IT = PreDefinedExpr::PrettyFunction; break;
+ case tok::kw___func__: IT = PredefinedExpr::Func; break; // [C99 6.4.2.2]
+ case tok::kw___FUNCTION__: IT = PredefinedExpr::Function; break;
+ case tok::kw___PRETTY_FUNCTION__: IT = PredefinedExpr::PrettyFunction; break;
}
// Verify that this is in a function context.
@@ -423,7 +423,7 @@
llvm::APInt LengthI(32, Length + 1);
QualType ResTy = Context.CharTy.getQualifiedType(QualType::Const);
ResTy = Context.getConstantArrayType(ResTy, LengthI, ArrayType::Normal, 0);
- return new PreDefinedExpr(Loc, ResTy, IT);
+ return new PredefinedExpr(Loc, ResTy, IT);
}
Sema::ExprResult Sema::ActOnCharacterConstant(const Token &Tok) {
Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=54605&r1=54604&r2=54605&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Sat Aug 9 20:53:14 2008
@@ -62,8 +62,8 @@
if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(CurContext))
if (MD->isInstance())
- return new PreDefinedExpr(ThisLoc, MD->getThisType(Context),
- PreDefinedExpr::CXXThis);
+ return new PredefinedExpr(ThisLoc, MD->getThisType(Context),
+ PredefinedExpr::CXXThis);
return Diag(ThisLoc, diag::err_invalid_this_use);
}
Modified: cfe/trunk/lib/Sema/SemaExprObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprObjC.cpp?rev=54605&r1=54604&r2=54605&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprObjC.cpp Sat Aug 9 20:53:14 2008
@@ -158,8 +158,8 @@
if (getCurMethodDecl()->isInstance()) {
QualType superTy = Context.getObjCInterfaceType(ClassDecl);
superTy = Context.getPointerType(superTy);
- ExprResult ReceiverExpr = new PreDefinedExpr(SourceLocation(), superTy,
- PreDefinedExpr::ObjCSuper);
+ ExprResult ReceiverExpr = new PredefinedExpr(SourceLocation(), superTy,
+ PredefinedExpr::ObjCSuper);
// We are really in an instance method, redirect.
return ActOnInstanceMessage(ReceiverExpr.Val, Sel, lbrac, rbrac,
Args, NumArgs);
More information about the cfe-commits
mailing list