[LLVMdev] Does llvm-lit support type substitution (macro)?
David Blaikie
dblaikie at gmail.com
Wed Sep 10 08:39:28 PDT 2014
Nope, lit doesn't have anything like that.
Best to keep the tests simple, sometimes to the point of being repetitious.
Do you actually have different codepaths to test for each type?
On Sep 10, 2014 8:05 AM, "lyh.kernel" <lyh.kernel at gmail.com> wrote:
> Hello all,
>
> I am writing test cases which are dedicated to be executed by llvm-lit.
> Most of my test cases have the same logic but different types. For example:
>
> // RUN: %clang_cc1 -fsyntax-only
> func (int a) {
> a = 3;
> }
>
> // RUN: %clang_cc1 -fsyntax-only
> func (char a) {
> a = 3;
> }
>
> // RUN: %clang_cc1 -fsyntax-only
> func (unsigned a) {
> a = 3;
> }
>
> Now I put them in three different test cases but it is hard to maintain. I
> am wondering whether llvm-lit support writing test cases with macro
> parameter and a parameter config file:
>
> // RUN: %clang_cc1 -fsyntax-only
> func (TYPE a) {
> a = 3;
> }
>
> // TYPE config
> TYPE = {int, char, unsigned}
>
> Many thanks
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140910/c22c7a9a/attachment.html>
More information about the llvm-dev
mailing list