llvmpy/tools/genopcodes.sh
mdevan.foobar 5901f8d32b Migrate to LLVM 2.6 (KS Sreeram) (Issue #25)
git-svn-id: http://llvm-py.googlecode.com/svn/trunk@83 8d1e9007-1d4e-0410-b67e-1979fd6579aa
2009-10-28 06:02:04 +00:00

1 line
190 B
Bash
Executable file

cat ~/local/include/llvm/Instruction.def | grep '^HANDLE' | sed -e 's/^[^(]*(//' | sed -e 's#).*$##' | sed -e 's/,[^,]*$//' | sed -e 's/,//' | awk '{printf("OPCODE_%-14s = %s\n", $2, $1);}'