diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-01-12 22:11:34 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-01-12 22:11:34 +0000 |
commit | 9370c8f4af43a98a6f16e65f5d88d58db846e374 (patch) | |
tree | a0d157cc29c5314243f6e0a1ea3e4ebf40de01d5 /lib/CodeGen/CGExprScalar.cpp | |
parent | ac6c09917eaf32a35d2c7c95856864d877ef1963 (diff) |
Add IR generation support for SizeOfPackExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123332 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 6b22fc48d4..f80304d6de 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -195,6 +195,11 @@ public: return Builder.CreateBitCast(V, ConvertType(E->getType())); } + Value *VisitSizeOfPackExpr(SizeOfPackExpr *E) { + return llvm::ConstantInt::get(ConvertType(E->getType()), + E->getPackLength()); + } + // l-values. Value *VisitDeclRefExpr(DeclRefExpr *E) { Expr::EvalResult Result; |