summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r--lib/CodeGen/CGExprScalar.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
index 628bfb0788..3b9db6a4bb 100644
--- a/lib/CodeGen/CGExprScalar.cpp
+++ b/lib/CodeGen/CGExprScalar.cpp
@@ -692,7 +692,7 @@ ScalarExprEmitter::VisitSizeOfAlignOfExpr(const SizeOfAlignOfExpr *E) {
const Type *Key =
CGF.getContext().getTagDeclType(
const_cast<TagDecl*>(dyn_cast<TagDecl>(RD))).getTypePtr();
- TypeToSize = Key->getDesugaredType();
+ TypeToSize = QualType(Key->getAsRecordType(), 0);
}
std::pair<uint64_t, unsigned> Info = CGF.getContext().getTypeInfo(TypeToSize);