r188663 - XCore target: correct test layout

Robert Lytton robert at xmos.com
Thu Aug 22 01:01:51 PDT 2013

Hi Dmitri,

Here is a patch to correct test RUN parameters.


From: Dmitri Gribenko [gribozavr at gmail.com]
Sent: 20 August 2013 18:23
To: Robert Lytton
Cc: cfe-commits cfe
Subject: Re: r188663 - XCore target: correct test layout

On Tue, Aug 20, 2013 at 1:15 AM, Robert Lytton <robert at xmos.com> wrote:
> I've searched briefly for documentation, but did not come across anything that explains the mechanism.
> Could you enlighten me?
> Is 'clang' the driver, which in turn will call the C compiler 'cc1' (assuming a .c file)?

That's correct.  A more detailed explanation is here

> As we know we want the C compiler we can call it directly - removing an unnecessary step.

Yes, that's why we want to call clang -cc1.

> Does the test suite will convert 'clang_cc1' into 'clang -cc1'?

Yes, %clang_cc1 is a special alias for /path/to/build/bin/clang -cc1.

> Also, would I be right in thinking that -O0 will be the default, so this can be left off too?

-O0 is the default.

> Thus, I should use:
>     // RUN: %clang_cc1 -target xcore -o - -emit-llvm -S %s | FileCheck %s

Yes, except that you don't need -S, and -target should be -triple.
See other tests in CodeGen directory.

> However, the driver test should remain:
>     // RUN: %clang -target xcore %s -### -o %t.o 2>&1 FileCheck %s

Yes, driver tests are the only tests that should invoke %clang instead
of %clang_cc1.


(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PatchTestRunParams
Type: application/octet-stream
Size: 483 bytes
Desc: PatchTestRunParams
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130822/09592953/attachment.obj>

More information about the cfe-commits mailing list