summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/inline.c
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-04-02 23:17:29 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-04-02 23:17:29 +0000
commit54e3ba5ace52bcdc0d20d69f715c202a31d8c525 (patch)
treee6bea97dce3a77aa76100538736bddb69c28f36e /clang/test/CodeGen/inline.c
parentb0abeb098418fea4b87a7bdc0f66d2942d0ca77e (diff)
downloadbcm5719-llvm-54e3ba5ace52bcdc0d20d69f715c202a31d8c525.tar.gz
bcm5719-llvm-54e3ba5ace52bcdc0d20d69f715c202a31d8c525.zip
CodeGen: Emit some functions as weak_odr under -fms-compatibility
Summary: MSVC always emits inline functions marked with the extern storage class specifier. The result is something similar to the opposite of __attribute__((gnu_inline)). This extension is also available in C. This fixes PR19264. Reviewers: rnk, rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3207 llvm-svn: 205485
Diffstat (limited to 'clang/test/CodeGen/inline.c')
-rw-r--r--clang/test/CodeGen/inline.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/test/CodeGen/inline.c b/clang/test/CodeGen/inline.c
index 70ab696b64e..96c9a86baec 100644
--- a/clang/test/CodeGen/inline.c
+++ b/clang/test/CodeGen/inline.c
@@ -53,12 +53,13 @@
// RUN: echo "MS C Mode tests:"
// RUN: %clang_cc1 %s -triple i386-unknown-unknown -O1 -disable-llvm-optzns -emit-llvm -o - -std=c99 -fms-compatibility | FileCheck %s --check-prefix=CHECK4
+// CHECK4-LABEL: define weak_odr i32 @ei()
// CHECK4-LABEL: define i32 @bar()
+// CHECK4-NOT: unreferenced1
+// CHECK4-LABEL: define weak_odr void @unreferenced2()
// CHECK4-LABEL: define void @gnu_inline()
// CHECK4-LABEL: define available_externally void @gnu_ei_inline()
// CHECK4-LABEL: define linkonce_odr i32 @foo()
-// CHECK4-NOT: unreferenced
-// CHECK4-LABEL: define linkonce_odr i32 @ei()
extern __inline int ei() { return 123; }
OpenPOWER on IntegriCloud