summaryrefslogtreecommitdiff
path: root/test/CodeGen/long-call-attr.c
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2017-07-21 08:10:57 +0000
committerSimon Atanasyan <simon@atanasyan.com>2017-07-21 08:10:57 +0000
commit56e0f485c950729fe37102368e12d73810d0720c (patch)
tree8be3313a80d7bcaf05e852369f465ad658dffd5c /test/CodeGen/long-call-attr.c
parent217d16e0395debf71e13e6623b4b3b0bb9a83e8f (diff)
downloadclang-56e0f485c950729fe37102368e12d73810d0720c.tar.gz
[mips] Add `short_call` to the set of `long_call/far/near` attributes
MIPS gcc supports `long_call/far/near` attributes only, but other targets have the `short_call` attribut, so let's support it for MIPS for consistency. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308719 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/long-call-attr.c')
-rw-r--r--test/CodeGen/long-call-attr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/CodeGen/long-call-attr.c b/test/CodeGen/long-call-attr.c
index e127f0b1e0..e1e528b347 100644
--- a/test/CodeGen/long-call-attr.c
+++ b/test/CodeGen/long-call-attr.c
@@ -1,17 +1,20 @@
// RUN: %clang_cc1 -triple mips-linux-gnu -emit-llvm -o - %s | FileCheck %s
void __attribute__((long_call)) foo1 (void);
+void __attribute__((short_call)) foo4 (void);
void __attribute__((far)) foo2 (void) {}
// CHECK: define void @foo2() [[FAR:#[0-9]+]]
-void __attribute__((near)) foo3 (void) { foo1(); }
+void __attribute__((near)) foo3 (void) { foo1(); foo4(); }
// CHECK: define void @foo3() [[NEAR:#[0-9]+]]
// CHECK: declare void @foo1() [[LONGDECL:#[0-9]+]]
+// CHECK: declare void @foo4() [[SHORTDECL:#[0-9]+]]
// CHECK: attributes [[FAR]] = { {{.*}} "long-call" {{.*}} }
// CHECK: attributes [[NEAR]] = { {{.*}} "short-call" {{.*}} }
// CHECK: attributes [[LONGDECL]] = { {{.*}} "long-call" {{.*}} }
+// CHECK: attributes [[SHORTDECL]] = { {{.*}} "short-call" {{.*}} }