Andrew Kelley 8e68d43ad3
avoid needlessly creating global constants
This deletes some legacy cruft, and produces leaner object files.
Example:

```
var x: i32 = 1234;

export fn entry() i32 {
    return x;
}
```

This produces:

```
@x = internal unnamed_addr global i32 1234, align 4
@0 = internal unnamed_addr constant i32* @x, align 8
```

and @0 is never even used. After this commit, @0 is not produced.

This fixes a bug: Zig was creating invalid LLVM IR when one of these
globals that shouldn't exist takes the address of a thread local
variable. In LLVM 8.0.0rc2, it would produce a linker error. But
probably after my bug report is solved it will be caught by the IR
verifier.

https://bugs.llvm.org/show_bug.cgi?id=40652
2019-02-10 10:58:00 -05:00
..
2018-06-27 16:20:04 +02:00
2018-06-27 16:20:04 +02:00
2018-07-07 00:25:32 -04:00
2018-09-05 23:23:11 -04:00
2018-09-11 22:25:52 -04:00
2016-09-19 11:54:01 -04:00
2018-11-26 20:04:35 -05:00
2018-11-26 20:04:35 -05:00
2016-12-01 21:08:12 -05:00
2019-01-29 22:30:30 -05:00
2017-04-10 20:02:39 -04:00
2018-11-13 05:08:37 -08:00
2018-12-26 15:25:54 -05:00
2018-12-26 15:25:54 -05:00
2018-12-26 15:25:54 -05:00
2018-11-27 20:56:43 -05:00
2018-10-27 11:35:01 -04:00