Thomas Veith
2010-Feb-18 19:31 UTC
[LLVMdev] minor patch to fix 'random` tblgen -gen-inst-enums-bug
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.. 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: TblGen.patch Type: text/x-patch Size: 1352 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100218/f5a4c63b/attachment.bin>
Chris Lattner
2010-Feb-18 21:40 UTC
[LLVMdev] minor patch to fix 'random` tblgen -gen-inst-enums-bug
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
Seemingly Similar Threads
- [LLVMdev] getNodePriority()
- TargetOpcode::KILL confusion
- kerberos5 / gssapi support in mount.cifs?
- [LLVMdev] [llvm-commits] [PATCH] MachineRegisterInfo: Don't emit the same livein copy more than once
- Problem reading/writing permissions under Windows (V 2.2.8a)