[LLVMdev] ValueSymbolTable's mutators are private?
samuraileumas at yahoo.com
Fri Jul 9 15:59:58 PDT 2010
Solved on IRC. GlobalVariable can also be a constant if you specify a flag in
----- Original Message ----
> From: Samuel Crow <samuraileumas at yahoo.com>
> To: Chris Lattner <clattner at apple.com>
> Cc: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu>
> Sent: Fri, July 9, 2010 3:18:56 PM
> Subject: Re: [LLVMdev] ValueSymbolTable's mutators are private?
> Hi Chris,
> I was thinking that CreateValueName() was the way to add a symbol to a symbol
> table. Perhaps I'm thinking about this wrong. Here's what I've got:
> I've got a string generated by the parser which is constant. I need to add it
> to the symbol table so that, on starting the second pass of my compiler, I can
> dump all of the string constants to be generated as code. I have a name, a
> (ConstantStruct since the length is stored internally to the structure), and
> place to put it. I thought that since the Module created by my compiler has a
> symbol table, I could generate it as a global. I already have a
> StringMap allocated to get the name on the second pass. Should I just make
> another StringMap for all of my variable names and declared constants? That
> seems to me what a symbol table is used for though.
> ----- Original Message ----
> > From: Chris Lattner <clattner at apple.com>
> > To: Samuel Crow <samuraileumas at yahoo.com>
> > Cc: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu>
> > Sent: Fri, July 9, 2010 3:03:50 PM
> > Subject: Re: [LLVMdev] ValueSymbolTable's mutators are private?
> > On Jul 9, 2010, at 12:02 PM, Samuel Crow wrote:
> > > Hello,
> > >
> > > Why are ValueSymbolTable's mutators all private? I can't seem to find a
> > > add a symbol to the table without using one of them. It looks like a bug
> > > since there is no way to use it otherwise.
> > The mutators are things like Value::setName()
> > -Chris
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev