[cfe-dev] How to create function local static void* array in Clang CodeGen

Mustakimur Rahman Khandaker (Mustakim) via cfe-dev cfe-dev at lists.llvm.org
Sat Jan 26 17:44:15 PST 2019


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);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190126/22e5f86e/attachment.html>


More information about the cfe-dev mailing list