diff options
author | David Spickett <david.spickett@linaro.org> | 2023-11-04 19:54:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-04 20:54:43 +0100 |
commit | 971889e5d77be91b854ab9376613b51d3ea6aec9 (patch) | |
tree | 8b4dcfbcc2d9a60576dd185c1b7f58839132a9f8 /test | |
parent | bb66fc6a9719f913b01fd6708b5e900329d65e0e (diff) | |
download | compiler-explorer-971889e5d77be91b854ab9376613b51d3ea6aec9.tar.gz compiler-explorer-971889e5d77be91b854ab9376613b51d3ea6aec9.zip |
LLVM TableGen: Add actions to Overrides menu (#5699)gh-9391
Diffstat (limited to 'test')
-rw-r--r-- | test/compilers/argument-parsers-tests.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/compilers/argument-parsers-tests.js b/test/compilers/argument-parsers-tests.js index 16ff3d8f5..770dad72c 100644 --- a/test/compilers/argument-parsers-tests.js +++ b/test/compilers/argument-parsers-tests.js @@ -29,6 +29,7 @@ import { GCCParser, ICCParser, PascalParser, + TableGenParser, VCParser, } from '../../lib/compilers/argument-parsers.js'; import {FakeCompiler} from '../../lib/compilers/fake-for-test.js'; @@ -272,3 +273,28 @@ describe('ICC argument parser', () => { ]); }); }); + +describe('TableGen argument parser', () => { + it('Should extract actions', () => { + const lines = [ + 'USAGE: llvm-tblgen [options] <input file>', + '', + 'OPTIONS:', + '', + 'General options:', + '', + ' -D <macro name> - Name of the macro...', + ' Action to perform:', + ' --gen-attrs - Generate attributes', + ' --print-detailed-records - Print full details...', + ' --gen-x86-mnemonic-tables - Generate X86...', + ' --no-warn-on-unused-template-args - Disable...', + ]; + const actions = TableGenParser.extractPossibleActions(lines); + actions.should.deep.equal([ + {name: 'gen-attrs: Generate attributes', value: '--gen-attrs'}, + {name: 'print-detailed-records: Print full details...', value: '--print-detailed-records'}, + {name: 'gen-x86-mnemonic-tables: Generate X86...', value: '--gen-x86-mnemonic-tables'}, + ]); + }); +}); |