[pr19844] Add thread local mode to aliases.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Wed May 28 11:23:58 PDT 2014


On 28 May 2014 13:07, Reid Kleckner <rnk at google.com> wrote:
> LGTM

r209759. Thanks.

> +  void setThreadLocalMode(ThreadLocalMode Val) {
> +    assert(Val == NotThreadLocal || getValueID() != Value::FunctionVal);
>
> I guess isa<> isn't available.

Correct.

> +    ThreadLocal = Val;
> +  }
> +  ThreadLocalMode getThreadLocalMode() const {
> +    assert(ThreadLocal == NotThreadLocal || getValueID() !=
> Value::FunctionVal);
>
> This would trigger on MyGVThatIsAFunction->isThreadLocal().  It seems a bit
> surprising that you can't call the getter on any GlobalValue.  I'd only
> assert in the setter.

Good point. Fixed before committing.

Cheers,
Rafael



More information about the llvm-commits mailing list