2011-06-04 02:36:30 +08:00
|
|
|
// REQUIRES: x86-registered-target
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: %clang -target i386-apple-darwin10 -flto -S -g %s -o - | FileCheck %s
|
2016-09-13 09:13:19 +08:00
|
|
|
|
|
|
|
// CHECK: @main.localstatic = internal global i32 0, align 4, !dbg [[L:![0-9]+]]
|
|
|
|
// CHECK: @global = common global i32 0, align 4, !dbg [[G:![0-9]+]]
|
|
|
|
|
2009-10-21 02:26:30 +08:00
|
|
|
int global;
|
2010-04-30 01:48:37 +08:00
|
|
|
int main() {
|
|
|
|
static int localstatic;
|
|
|
|
return 0;
|
|
|
|
}
|
2011-10-27 15:11:43 +08:00
|
|
|
|
2016-12-20 10:10:02 +08:00
|
|
|
// CHECK: [[L]] = !DIGlobalVariableExpression(var: [[LV:.*]])
|
|
|
|
// CHECK: [[LV]] = distinct !DIGlobalVariable(name: "localstatic"
|
|
|
|
// CHECK-NOT: linkageName:
|
|
|
|
// CHECK-SAME: line: 9,
|
|
|
|
// CHECK: [[G]] = !DIGlobalVariableExpression(var: [[GV:.*]])
|
|
|
|
// CHECK: [[GV]] = distinct !DIGlobalVariable(name: "global"
|
|
|
|
// CHECK-NOT: linkageName:
|
|
|
|
// CHECK-SAME: line: 7,
|