mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 17:36:05 +00:00
as eli points out, we're not doing memory stuff here. While ConvertType
and ConvertTypeForMem are the same for pointers, it is best to just use ConvertType. Thanks Eli! llvm-svn: 135567
This commit is contained in:
parent
2210448520
commit
245169620a
@ -174,7 +174,7 @@ namespace {
|
||||
}
|
||||
|
||||
static llvm::Value *
|
||||
CreateReferenceTemporary(CodeGenFunction& CGF, QualType Type,
|
||||
CreateReferenceTemporary(CodeGenFunction &CGF, QualType Type,
|
||||
const NamedDecl *InitializedDecl) {
|
||||
if (const VarDecl *VD = dyn_cast_or_null<VarDecl>(InitializedDecl)) {
|
||||
if (VD->hasGlobalStorage()) {
|
||||
|
@ -1077,8 +1077,7 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
|
||||
|
||||
// Make sure the array decay ends up being the right type. This matters if
|
||||
// the array type was of an incomplete type.
|
||||
return CGF.Builder.CreateBitCast(V,
|
||||
CGF.getTypes().ConvertTypeForMem(CE->getType()));
|
||||
return CGF.Builder.CreateBitCast(V, ConvertType(CE->getType()));
|
||||
}
|
||||
case CK_FunctionToPointerDecay:
|
||||
return EmitLValue(E).getAddress();
|
||||
|
Loading…
x
Reference in New Issue
Block a user