mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 05:49:23 +02:00
* insert a type conversion if the final result of an queued expression is
different from the type of typed constant/initialised data git-svn-id: branches/hlcgllvm@28146 -
This commit is contained in:
parent
ab186e8d75
commit
fc7d5e2254
@ -95,6 +95,12 @@ implementation
|
|||||||
|
|
||||||
procedure tllvmtai_typedconstbuilder.update_queued_tai(resdef: tdef; outerai, innerai: tai; newindex: longint);
|
procedure tllvmtai_typedconstbuilder.update_queued_tai(resdef: tdef; outerai, innerai: tai; newindex: longint);
|
||||||
begin
|
begin
|
||||||
|
{ is the result of the outermost expression different from the type of
|
||||||
|
this typed const? -> insert type conversion }
|
||||||
|
if not assigned(fqueued_tai) and
|
||||||
|
(resdef<>fqueued_def) and
|
||||||
|
(llvmencodetype(resdef)<>llvmencodetype(fqueued_def)) then
|
||||||
|
queue_typeconvn(resdef,fqueued_def);
|
||||||
if assigned(fqueued_tai) then
|
if assigned(fqueued_tai) then
|
||||||
begin
|
begin
|
||||||
taillvm(flast_added_tai).loadtai(fqueued_tai_opidx,outerai);
|
taillvm(flast_added_tai).loadtai(fqueued_tai_opidx,outerai);
|
||||||
|
Loading…
Reference in New Issue
Block a user