X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FLLVMC%2FOptionPreprocessor.td;h=5fdc35a187ebb4e825e623c9ab2782cbe6083202;hb=d966817f3cb87897cbec29c967b974924fe939ba;hp=e5d6bbb383a09d7c4d16606b6c7e8e88b7b8e648;hpb=9503b49462a482d7566077d6bbb368d798611390;p=oota-llvm.git diff --git a/test/LLVMC/OptionPreprocessor.td b/test/LLVMC/OptionPreprocessor.td index e5d6bbb383a..5fdc35a187e 100644 --- a/test/LLVMC/OptionPreprocessor.td +++ b/test/LLVMC/OptionPreprocessor.td @@ -1,7 +1,8 @@ -// Test for the OptionPreprocessor and any*. +// Test for the OptionPreprocessor and related functionality. // RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t // RUN: FileCheck -input-file %t %s -// RUN: %compile_cxx -fexceptions -x c++ %t +// RUN: %compile_cxx %t +// XFAIL: vg_leak include "llvm/CompilerDriver/Common.td" @@ -21,25 +22,30 @@ def Preprocess : OptionPreprocessor< // CHECK: foo = false; // CHECK: foo_p = ""; // CHECK: foo_l.clear(); - (and (switch_on "foo"), (any_switch_on ["bar", "baz"])), + (and (switch_on "foo"), (any_switch_on "bar", "baz")), [(warning "W1"), (unset_option "foo"), (unset_option "foo_p"), (unset_option "foo_l")], // CHECK: W2 // CHECK: foo = true; + // CHECK: bar = true; + // CHECK: baz = false; // CHECK: foo_p = "asdf"; // CHECK: foo_l.clear(); // CHECK: foo_l.push_back("qwert"); // CHECK: foo_l.push_back("yuiop"); // CHECK: foo_l.push_back("asdf"); - (and (switch_on ["foo", "bar"]), (any_empty ["foo_p", "bar_p"])), - [(warning "W2"), (set_option "foo"), (set_option "foo_p", "asdf"), + (and (switch_on "foo", "bar"), (any_empty "foo_p", "bar_p")), + [(warning "W2"), (set_option "foo"), + (set_option "bar", true), + (set_option "baz", false), + (set_option "foo_p", "asdf"), (set_option "foo_l", ["qwert", "yuiop", "asdf"])], // CHECK: W3 // CHECK: foo = true; // CHECK: bar = true; // CHECK: baz = true; - (and (empty ["foo_p", "bar_p"]), (any_not_empty ["baz_p"])), - [(warning "W3"), (set_option ["foo", "bar", "baz"])]) + (and (empty "foo_p", "bar_p"), (any_not_empty "baz_p")), + [(warning "W3"), (set_option "foo", "bar", "baz")]) >; // Shut up warnings... @@ -47,7 +53,7 @@ def dummy : Tool< [(in_language "dummy"), (out_language "dummy"), (output_suffix "d"), - (cmd_line "dummy $INFILE -o $OUTFILE"), + (command "dummy"), (actions (case (switch_on "foo"), (error), (switch_on "bar"), (error), (switch_on "baz"), (error), @@ -57,5 +63,5 @@ def dummy : Tool< (not_empty "foo_l"), (error))) ]>; -def Graph : CompilationGraph<[Edge<"root", "dummy">]>; +def Graph : CompilationGraph<[(edge "root", "dummy")]>;