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
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
index 9497ece..cc7d8e9 100644
--- a/lib/CodeGen/CGExprScalar.cpp
+++ b/lib/CodeGen/CGExprScalar.cpp
@@ -213,7 +213,7 @@
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 @@
} else if (E->getType()->isReferenceType()) {
assert(cast<ReferenceType>(E->getType().getCanonicalType())->
- getReferenceeType() ==
+ getPointeeType() ==
Op->getType().getCanonicalType() && "Incompatible types!");
return EmitLValue(Op).getAddress();