aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-08-10 01:53:14 +0000
committerChris Lattner <sabre@nondot.org>2008-08-10 01:53:14 +0000
commitd9f6910f4ef37c0e8eeee2a01287d9572c3176ef (patch)
tree11cdacedc41a441b204a6a6d0092e65ba35a1c29 /lib/CodeGen
parent55d71f9f4cf5f123db5d6dcfd20f3a8d5699c226 (diff)
rename PreDefinedExpr -> PredefinedExpr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54605 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGExpr.cpp12
-rw-r--r--lib/CodeGen/CGExprScalar.cpp2
-rw-r--r--lib/CodeGen/CGObjC.cpp6
-rw-r--r--lib/CodeGen/CodeGenFunction.h2
4 files changed, 11 insertions, 11 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index 7c5feb169b..091001e734 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -104,8 +104,8 @@ LValue CodeGenFunction::EmitLValue(const Expr *E) {
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 @@ LValue CodeGenFunction::EmitStringLiteralLValue(const StringLiteral *E) {
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 @@ LValue CodeGenFunction::EmitPreDefinedLValue(const PreDefinedExpr *E) {
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;
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
index 7f4bed7a2a..17ef1ed35d 100644
--- a/lib/CodeGen/CGExprScalar.cpp
+++ b/lib/CodeGen/CGExprScalar.cpp
@@ -138,7 +138,7 @@ public:
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();
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp
index 9bf53d9700..6a0400e68c 100644
--- a/lib/CodeGen/CGObjC.cpp
+++ b/lib/CodeGen/CGObjC.cpp
@@ -56,9 +56,9 @@ llvm::Value *CodeGenFunction::EmitObjCMessageExpr(const ObjCMessageExpr *E) {
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 {
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index 27917a4948..fd2d03313c 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -434,7 +434,7 @@ public:
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);