[cfe-dev] clang -emit-llvm infinite recursion
Chris Lattner
clattner at apple.com
Wed Oct 17 17:11:38 PDT 2007
On Oct 17, 2007, at 1:53 PM, Török Edvin wrote:
> Hi,
Hi Török,
> If I run clang on alex.i, with -emit-llvm option I get infinite
> recursion, if I run without it,
> it gives me errors [because struct initializers are not implemented,
> the errors are ok].
Ok, I'll follow up on the -fsyntax-only errors in a separate email.
> I know that struct initializers are not yet implemented (right?), but
> then -emit-llvm should give an error if it can't handle something, and
> not infinite recursion.
The issue in this case is that clang -emit-llvm doesn't handle
recursive structs at all yet. Hopefully this should be resolved in
the next couple weeks. Right now -emit-llvm is only really useful
for the most trivial programs.
Devang, we need to add a map to CodeGenTypes to keep track of already
emitted types, as llvm-gcc does. This is a little tricky because it
has to use the PATypeHandle machinery like llvm-gcc.
> I would have used bugpoint to create a reduced testcase, but I don't
> know how to use it with clang, is it possible to use it?
Nope, bugpoint can't handle this. It should reproduce with something
like this though:
struct S {
struct S * F;
};
struct S x;
> P.S.: I hope you don't misinterpret my mails, I want to help the
> development of clang/llvm by submitting the issues I encounter with
> it. That doesn't mean I don't like clang/llvm ;)
We welcome the help!
-Chris
More information about the cfe-dev
mailing list