aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-03-02 23:27:11 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-03-02 23:27:11 +0000
commita3ca41f0c2bd1c4a752df88b283332f3b757d21e (patch)
tree8aab234057f7a0c60c5d1bc20ad31ebb07d5977e /lib/CodeGen/CodeGenModule.h
parent067cc40308a9643400fd291fc8678c4a6785e90c (diff)
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
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r--lib/CodeGen/CodeGenModule.h10
1 files changed, 8 insertions, 2 deletions
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.