diff options
author | John Wiegley <johnw@boostpro.com> | 2011-04-25 06:54:41 +0000 |
---|---|---|
committer | John Wiegley <johnw@boostpro.com> | 2011-04-25 06:54:41 +0000 |
commit | 552622067dc45013d240f73952fece703f5e63bd (patch) | |
tree | 05c7abd4e26f18ecddc4d05de7dd30af3408fa7e /lib/CodeGen/CGExprScalar.cpp | |
parent | 62395c9666b84bcb0cb322d5f5183472712685f6 (diff) |
t/clang/expr-traits
Patch authored by David Abrahams.
These two expression traits (__is_lvalue_expr, __is_rvalue_expr) are used for
parsing code that employs certain features of the Embarcadero C++ compiler.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130122 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 6c5556d4f1..f6de1fa127 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -367,6 +367,10 @@ public: return llvm::ConstantInt::get(ConvertType(E->getType()), E->getValue()); } + Value *VisitExpressionTraitExpr(const ExpressionTraitExpr *E) { + return llvm::ConstantInt::get(Builder.getInt1Ty(), E->getValue()); + } + Value *VisitCXXPseudoDestructorExpr(const CXXPseudoDestructorExpr *E) { // C++ [expr.pseudo]p1: // The result shall only be used as the operand for the function call |