diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2009-12-15 03:04:52 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2009-12-15 03:04:52 +0000 |
commit | e4ac23a0ffbf3ad6eb94fce4e0fb2b934b84cbe4 (patch) | |
tree | 6f53530e91bde17f4c0d73fbc6b249d15c273847 /test/LLVMC/OneOrMore.td | |
parent | b5fab402d02671f92ea7fc6166ba80e00d6a8388 (diff) | |
download | llvm-e4ac23a0ffbf3ad6eb94fce4e0fb2b934b84cbe4.tar.gz llvm-e4ac23a0ffbf3ad6eb94fce4e0fb2b934b84cbe4.tar.bz2 llvm-e4ac23a0ffbf3ad6eb94fce4e0fb2b934b84cbe4.tar.xz |
Validate the generated C++ code in llvmc tests.
Checks that the code generated by 'tblgen --emit-llvmc' can be actually
compiled. Also fixes two bugs found in this way:
- forward_transformed_value didn't work with non-list arguments
- cl::ZeroOrOne is now called cl::Optional
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91404 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/LLVMC/OneOrMore.td')
-rw-r--r-- | test/LLVMC/OneOrMore.td | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/LLVMC/OneOrMore.td b/test/LLVMC/OneOrMore.td index 38b7eb7dff..08be7cfe8a 100644 --- a/test/LLVMC/OneOrMore.td +++ b/test/LLVMC/OneOrMore.td @@ -1,14 +1,15 @@ // Check that (one_or_more) and (zero_or_one) properties work. // The dummy tool and graph are required to silence warnings. // RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t -// RUN: grep cl::ZeroOrOne %t | count 1 +// RUN: grep cl::Optional %t | count 1 // RUN: grep cl::OneOrMore %t | count 1 +// RUN: %compile_cxx -fexceptions -x c++ %t include "llvm/CompilerDriver/Common.td" def OptList : OptionList<[ (prefix_list_option "foo", (one_or_more)), - (parameter_list_option "baz", (zero_or_one))]>; + (parameter_list_option "baz", (optional))]>; def dummy_tool : Tool<[ (cmd_line "dummy_cmd $INFILE"), |