diff options
author | Chris Lattner <sabre@nondot.org> | 2008-04-02 17:35:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-04-02 17:35:06 +0000 |
commit | bdcd637c29ec1540f912ea6860c88b910e78c329 (patch) | |
tree | 05002c136b0c19e0a6e9625b3f12750d2f89e806 /lib/CodeGen/CGExprScalar.cpp | |
parent | 987798ad1d5db2a8ec26cd5bbe434b35ad32659c (diff) |
add a common base class "PointerLikeType" for PointerType and ReferenceType,
allowing them to be treated the same in some contexts. A suggestion for a
better name is welcome :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49100 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 9497ece6fb..cc7d8e97e4 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -213,7 +213,7 @@ public: return EmitSizeAlignOf(E->getSubExpr()->getType(), E->getType(), false); } Value *EmitSizeAlignOf(QualType TypeToSize, QualType RetType, - bool isSizeOf); + bool isSizeOf); Value *VisitUnaryReal (const UnaryOperator *E); Value *VisitUnaryImag (const UnaryOperator *E); Value *VisitUnaryExtension(const UnaryOperator *E) { @@ -537,7 +537,7 @@ Value *ScalarExprEmitter::VisitImplicitCastExpr(const ImplicitCastExpr *E) { } else if (E->getType()->isReferenceType()) { assert(cast<ReferenceType>(E->getType().getCanonicalType())-> - getReferenceeType() == + getPointeeType() == Op->getType().getCanonicalType() && "Incompatible types!"); return EmitLValue(Op).getAddress(); |