blob: e1e528b347aacc0fc8dcfcb3502ab3e0aa711a6d [file] [log] [blame]
Simon Atanasyan1a116db2017-07-20 20:34:18 +00001// RUN: %clang_cc1 -triple mips-linux-gnu -emit-llvm -o - %s | FileCheck %s
2
3void __attribute__((long_call)) foo1 (void);
Simon Atanasyand5c937b2017-07-21 08:10:57 +00004void __attribute__((short_call)) foo4 (void);
Simon Atanasyan1a116db2017-07-20 20:34:18 +00005
6void __attribute__((far)) foo2 (void) {}
7
8// CHECK: define void @foo2() [[FAR:#[0-9]+]]
9
Simon Atanasyand5c937b2017-07-21 08:10:57 +000010void __attribute__((near)) foo3 (void) { foo1(); foo4(); }
Simon Atanasyan1a116db2017-07-20 20:34:18 +000011
12// CHECK: define void @foo3() [[NEAR:#[0-9]+]]
13
14// CHECK: declare void @foo1() [[LONGDECL:#[0-9]+]]
Simon Atanasyand5c937b2017-07-21 08:10:57 +000015// CHECK: declare void @foo4() [[SHORTDECL:#[0-9]+]]
Simon Atanasyan1a116db2017-07-20 20:34:18 +000016
17// CHECK: attributes [[FAR]] = { {{.*}} "long-call" {{.*}} }
18// CHECK: attributes [[NEAR]] = { {{.*}} "short-call" {{.*}} }
19// CHECK: attributes [[LONGDECL]] = { {{.*}} "long-call" {{.*}} }
Simon Atanasyand5c937b2017-07-21 08:10:57 +000020// CHECK: attributes [[SHORTDECL]] = { {{.*}} "short-call" {{.*}} }