[cfe-commits] r61231 - /cfe/trunk/lib/AST/ASTContext.cpp

Daniel Dunbar daniel at zuster.org
Sat Dec 20 11:49:07 PST 2008


On Fri, Dec 19, 2008 at 8:59 AM, Fariborz Jahanian <fjahanian at apple.com> wrote:
> On Dec 18, 2008, at 5:43 PM, Daniel Dunbar wrote:
>
> Sure. These patches came because of dejagnu test failures. There are still
> more issues
> that I am looking at. But tests will come first. Unfortunately, encoding
> mismatches are
> hard to find because they cause silent runtime failures. And dejagnu tests
> use them
> for other purposes than testing @encode.

This is why I wrote the print-class-info.m, it uses the Objective-C
runtime library to iterate over certain interfaces and print all their
metadata information. I tried to put examples of every kind of
construct in the classes we iterate over, so that we exercise all the
encoding code. By comparing the output of this program to gcc, we get
a pretty good idea that we are encoding things correctly.

> (from private email)
> This is a clang specific issue. llvm-gcc does not have this issue
> as it uses gcc's front-end for encoding.
> Why should this test goes into llvm source tree?

Not the llvm source tree, the llvm test suite source tree:
http://llvm.org/docs/TestingGuide.html#testsuiterun

The llvm test suite is our only current infrastructure for doing
executable / end-to-end tests. It makes sense to share these tests
because they are only relying on the "user visible" side of the
compiler. In this specific case, both llvm-gcc and clang should emit
metadata which matches gcc.

 - Daniel



More information about the cfe-commits mailing list