[LLVMdev] type-system-rewrite branch near landing

Jay Foad jay.foad at gmail.com
Thu Jul 7 00:55:57 PDT 2011

> 1. Clang - Jay, do you have a patch for this?

Yes. It's good enough to build most of LLVM+Clang, except for a couple
of files. But I'm running out of time and expertise to be able to fix
the remaining bits. Some specific concerns:

1. Many Objective-C(++) tests fail, because they use implicitly
defined structs for various ObjC runtime data structures; the
ASTConsumer HandleTagDeclDefinition callback is never called for these
structs, which means that I don't bother to lay them out, so they only
ever get an opaque LLVM type. Then we get assertion failures when
generating code to access fields in these structs.

2. Even some simple C cases fail, e.g.:

struct S;
extern struct T {
  struct S (*p)(void);
} t;
struct S { int i; };
void g(void) {

The problem here is that T.p is codegenned as i8*, so we need to
bitcast it to a proper function pointer type before calling it.
Shouldn't be too hard to implement.

3. There are other CodeGen tests that fail with assertion failures,
which I haven't investigated. (I'm starting to wonder if I went too
far when I ripped out all the PointersToResolve /
HandleLateResolvedPointers() stuff from CodeGenTypes.cpp.)

4. A bunch of the CodeGen tests need adjusting because we're
generating slightly different IR from what they expect.

> Can you create a branch of the clang repo or send an updated version of the patch to the list?

I'd be very surprised if I have the authority to create a branch,
given things like:

  ~/svn/llvm-project/llvm/branches$ svn up
  svn: Server sent unexpected return value (403 Forbidden) in response
to REPORT request for '/svn/llvm-project/!svn/vcc/default'

... so I've attached the patch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-type-system-rewrite.diff
Type: text/x-patch
Size: 141094 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110707/959e65f8/attachment.bin>

More information about the llvm-dev mailing list