mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 11:09:13 +02:00
+ llvmaggregatetype() helper that returns whether a def is represented by an
aggregate type in llvm git-svn-id: branches/hlcgllvm@26986 -
This commit is contained in:
parent
f344adaf22
commit
43e0eb3cfd
@ -41,6 +41,10 @@ interface
|
||||
function llvmencodeproctype(def: tabstractprocdef; withprocname, withparanames: boolean): TSymStr;
|
||||
procedure llvmaddencodedproctype(def: tabstractprocdef; withprocname, withparanames: boolean; var encodedstr: TSymStr);
|
||||
|
||||
{ returns whether a def is representated by an aggregate type in llvm
|
||||
(struct, array) }
|
||||
function llvmaggregatetype(def: tdef): boolean;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
@ -56,6 +60,20 @@ implementation
|
||||
Type encoding
|
||||
*******************************************************************}
|
||||
|
||||
function llvmaggregatetype(def: tdef): boolean;
|
||||
begin
|
||||
result:=
|
||||
(def.typ in [recorddef,filedef,variantdef]) or
|
||||
((def.typ=arraydef) and
|
||||
not is_dynamic_array(def)) or
|
||||
((def.typ=setdef) and
|
||||
not is_smallset(def)) or
|
||||
is_shortstring(def) or
|
||||
is_object(def) or
|
||||
((def.typ=procvardef) and
|
||||
not tprocvardef(def).is_addressonly)
|
||||
end;
|
||||
|
||||
|
||||
procedure llvmaddencodedtype(def: tdef; inaggregate: boolean; var encodedstr: TSymStr);
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user