diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-03-02 23:27:11 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-03-02 23:27:11 +0000 |
commit | bc638767f8456cec12271962e3a947528e7348e3 (patch) | |
tree | d93aa2d90d3496231500b31b68d49fe09742a066 /clang/lib/CodeGen/CodeGenModule.h | |
parent | 44f6bddb17c795acfa7fb704f5ed48fc6d39afb1 (diff) | |
download | llvm-bc638767f8456cec12271962e3a947528e7348e3.zip llvm-bc638767f8456cec12271962e3a947528e7348e3.tar.gz llvm-bc638767f8456cec12271962e3a947528e7348e3.tar.bz2 |
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.
llvm-svn: 151955
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 8bbee6a2..ba4887d 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/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. |