New expression in ToElemVisitor

kinke kinke at libero.it
Mon Aug 20 09:35:04 UTC 2018


On Monday, 20 August 2018 at 07:52:31 UTC, Jacob Carlborg wrote:
> I'm adding support for a new expression to `ToElemVisitor`. It 
> seems like I need to create a `DValue`, which seems to require 
> a `llvm::Global` and a D type. I have the `llvm::Global` but 
> not the D type. The global is created by the compiler. Any 
> ideas/hints?

Yeah, results of expressions are DValues, an association of an 
arbitrary llvm::Value* (not just globals) with a D type. Not 
having a D type wasn't an issue until now, as all expressions 
have one (Expression::type); why is yours special? - As it's a 
global (presumably ObjC stuff), you could probably get away with 
a void ptr.


More information about the digitalmars-d-ldc mailing list