Issue 136663
Summary Documentation inconsistency for aliases
Labels new issue
Assignees
Reporter camilstaps
    The documentation for aliases (GlobalAlias) says (emphasis mine):

> Aliases have a name and **an aliasee that is either a global value or a constant _expression_**.

The syntax, however, seems to allow for global values but not constant expressions, because of the `@` in front of `<Aliasee>`:

```llvm
@<Name> = [Linkage] [PreemptionSpecifier] [Visibility] [DLLStorageClass] [ThreadLocal] [(unnamed_addr|local_unnamed_addr)] alias <AliaseeTy>, <AliaseeTy>* @<Aliasee>
          [, partition "name"]
```

The natural language documentation seems to be correct, because (at least on X86) I can do the following:

```llvm
@x = global i32 1
@y = alias i32, i32* getelementptr (i32, ptr @x, i32 1)
```

So, I think the `@` in front of `<Aliasee>` should be removed.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to