[LLVMdev] minor patch to fix 'random` tblgen -gen-inst-enums-bug

Chris Lattner clattner at apple.com
Thu Feb 18 13:40:03 PST 2010


On Feb 18, 2010, at 11:31 AM, Thomas Veith wrote:

> Hi *,
> 
> to decide in which namespace tablegen should place the
> instruction-enum, tablegen iterates over CodeGenTarget instructions
> until it finds an Instruction with a namespace other than
> "TargetInstInfo".. but this is wrong, as internal Instructions now use
> "TargetOpcode" as Namespace..

Is this patch against mainline?  The patch doesn't apply and I don't see anything even close to that code in that file.

-Chris

> 
> As Instructions are a map, it is only by chance which is the first
> instruction it finds - either a user-defined, everything okay - or an
> internal, which results code like
> 
> namespace llvm {
> namespace TargetOpcode {
>  enum {
>    PHI = 0,
> ...
> 
> which of course cant compile...
> 
> Attached patch fixes the issue.
> 
> Best regards,
> 
> Thomas
> <TblGen.patch>_______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev





More information about the llvm-dev mailing list