From a3ca41f0c2bd1c4a752df88b283332f3b757d21e Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 2 Mar 2012 23:27:11 +0000 Subject: Reinstate r151879, r151880, reverted in r151922, along with a bugfix for scalar emission of DeclRefExprs to const bools: emit scalar bools as i1, not as i8. In addition to the extra unit testing, this has successfully bootstrapped. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151955 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/CodeGenModule.h') diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index 8bbee6a284..ba4887d057 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -706,11 +706,17 @@ public: llvm::Constant *EmitConstantExpr(const Expr *E, QualType DestType, CodeGenFunction *CGF = 0); - /// EmitConstantValue - Try to emit the given constant value as a - /// constant; returns 0 if the value cannot be emitted as a constant. + /// EmitConstantValue - Emit the given constant value as a constant, in the + /// type's scalar representation. llvm::Constant *EmitConstantValue(const APValue &Value, QualType DestType, CodeGenFunction *CGF = 0); + /// EmitConstantValueForMemory - Emit the given constant value as a constant, + /// in the type's memory representation. + llvm::Constant *EmitConstantValueForMemory(const APValue &Value, + QualType DestType, + CodeGenFunction *CGF = 0); + /// EmitNullConstant - Return the result of value-initializing the given /// type, i.e. a null expression of the given type. This is usually, /// but not always, an LLVM null constant. -- cgit v1.2.3-70-g09d2