[cfe-dev] Getting an Allocaed block into an Expr

Nat! nat at mulle-kybernetik.com
Thu Jun 18 02:16:11 PDT 2015


Hi

I have the following problem in creating a custom function call. I want to reuse CodeGenFunction::EmitCallArgs, since it seems to be solving some tricky issues with MS compilers. 

At the time I want to call `EmitCallArgs` I have all my arguments ready, except one, which I am allocaing on the fly like this:

LValue   Record = MakeNaturalAlignAddrLValue( CreateMemTemp( RecTy, "_additional"), RecTy);

So now I have an (LLVM) LValue  but EmitCallArgs expects an iterator of (CLANG) Expr *. So I would like to fake a temporary pointer expression to my allocaed record add it to my arguments and call EmitCallArgs. But I haven't found a place in clang, that creates a pointer expr to a LLVM LValue. Maybe it's impossible ? 

Thanks for any help in advance
	Nat!
------------------------------------------------------
Ignorance more frequently begets confidence than does
knowledge  -- Darwin





More information about the cfe-dev mailing list