Closed ghost closed 11 years ago
The Bool
which is the second half of the parameters
pair is for indicating varargs functions - it should usually be False
, but be True
for functions like printf
.
The omission of the garbage collector name is a bug.
Fixed in llvm-3.2 as 3.2.8.0, llvm-3.3 as 3.3.8.0, and master.
I am using this library to generate a backend for a small compiler project. I am stuck on a point in the LLVM-General-Pure package.
In LLVM-General-AST
A function is defined: Function Linkage Visibility CallingConvention [ParameterAttribute] Type Name ([Parameter], Bool) [FunctionAttribute](Maybe String) Word32 [BasicBlock]
My main question is in the parameter list, why is a boolean value wrapped up with it; i.e. why ([Parameter],Bool). The LLVM language reference just asks for a possibly empty list of parameters, so it is unclear what this boolean value is used for.
The second question regards the garbage collector name. In the LLVM reference, part of a function declaration is an optional garbage collector name. Is this feature not supported?
I am writing a small compiler backend using your library. If it would help your documentation, I could link you to it once I am finished... I would volunteer to help with the documentation, but I don't know the internals of LLVM that well, so I am not sure that would be useful.