Get LLVM and extern blocks working again

See individual commit messages. With these changes, Hello World
once again works with --llvm, and test/extern/ferguson tests are working.

@noakesmichael to review externCResolve change
@sungeunchoi to review --about changes

Anybody else for the others!

I was very surprised to see
symbols with FLAG_TYPE_VARIABLE ending up all the way
in codegen. In particular, I'd recommend that somebody
add an assertion failure near "Why are we getting here?"
around expr.cpp:3721 in the patched version -- I don't
think that code should be necessary.

Hi Michael:

I think this change is OK for now.

As part of the work on calling user default constructors, I have code in my branch that resolves extern typedefs down to their fundamental representation in Chapel types (where that is possible).  So it is likely that the need for this clause will go away after that is checked into the master branch.

On the other hand, I can't see any harm in codegenning the typedef, even if it is never used -- that just becomes a cleanup task after my changes are merged.

So in other words, I'm fine with that change.

THH
________________________________
From: mppf [notifications@github.com]
Sent: Tuesday, August 12, 2014 10:17 AM
To: chapel-lang/chapel
Cc: Tom Hildebrandt
Subject: Re: [chapel] Get LLVM and extern blocks working again (#124)


In compiler/AST/symbol.cpp:

> @@ -531,7 +531,14 @@ GenRet VarSymbol::codegen() {
>  #ifdef HAVE_LLVM
>
>      // for LLVM
> -
> +
> +    // Handle extern type variables.
> +    if( hasFlag(FLAG_EXTERN) && hasFlag(FLAG_TYPE_VARIABLE) ) {
> +      // code generate the type.
> +      GenRet got = typeInfo();
> +      return got;
> +    }
> +


@hildeth<https://github.com/hildeth> can you OK this change to symbol.cpp?

—
Reply to this email directly or view it on GitHub<https://github.com/chapel-lang/chapel/pull/124/files#r16127584>.