How to create function local static void* array in Clang CodeGen

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to create function local static void* array in Clang CodeGen

David Blaikie via cfe-dev
Hi

I am trying to create a local static void* array in CodeGenFunction::StartFunction(). I think I can do it by calling: VarDecl::Create(). But I am little confused with the required passing argument for what kind of variable I want to create. I have currently following:
Note: the ? I have failed to understand what should be.
std::string VarName = "__void_p_local_static_array";
IdentifierInfo &NameIdent = getContext().Idents.get(VarName);

auto *defaultVarDecl = VarDecl::Create(getContext(), ?,?, ?,
&NameIdent,?, (TypeSourceInfo *)0, SC_Static);

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev