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

Thomas Veith th.veith at googlemail.com
Thu Feb 18 11:31:59 PST 2010


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>


More information about the llvm-dev mailing list