Peter Collingbourne | 002c2d5 | 2017-02-14 03:42:38 +0000 | [diff] [blame] | 1 | ; RUN: opt -thinlto-bc -o %t %s |
| 2 | ; RUN: llvm-modextract -b -n 0 -o - %t | llvm-dis | FileCheck --check-prefix=M0 %s |
| 3 | ; RUN: llvm-modextract -b -n 1 -o - %t | llvm-dis | FileCheck --check-prefix=M1 %s |
| 4 | |
| 5 | define [1 x i8*]* @source() { |
| 6 | ret [1 x i8*]* @g |
| 7 | } |
| 8 | |
| 9 | ; M0: @"g$84f59439b469192440047efc8de357fb" = external hidden constant [1 x i8*]{{$}} |
| 10 | ; M1: @"g$84f59439b469192440047efc8de357fb" = hidden constant [1 x i8*] [i8* bitcast (i64 (i8*)* @"ok$84f59439b469192440047efc8de357fb" to i8*)] |
| 11 | @g = internal constant [1 x i8*] [ |
| 12 | i8* bitcast (i64 (i8*)* @ok to i8*) |
| 13 | ], !type !0 |
| 14 | |
| 15 | ; M0: define hidden i64 @"ok$84f59439b469192440047efc8de357fb" |
| 16 | ; M1: define available_externally hidden i64 @"ok$84f59439b469192440047efc8de357fb" |
| 17 | define internal i64 @ok(i8* %this) { |
| 18 | ret i64 42 |
| 19 | } |
| 20 | |
| 21 | !0 = !{i32 0, !"typeid"} |