diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-12-09 16:59:22 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-12-09 16:59:22 +0000 |
commit | 8f1509446fc51db0473ea1241910c06353a153b8 (patch) | |
tree | 297bb805e1d5121d24c9ce607310768b4e14ad66 /test/CodeGenCXX/inline-functions.cpp | |
parent | 40e17752086c2c497951d64f5ac6ab5039466113 (diff) |
When an "inline" declaration was followed by a definition not marked
"inline", we weren't giving the definition weak linkage because the
"inline" bit wasn't propagated. This was a longstanding FIXME that,
somehow, hadn't triggered a bug in the wild. Fix this problem by
tracking whether any declaration was marked "inline", and clean up the
semantics of GNU's "extern inline" semantics calculation based on this
change.
Fixes <rdar://problem/8740363>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121373 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/inline-functions.cpp')
-rw-r--r-- | test/CodeGenCXX/inline-functions.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGenCXX/inline-functions.cpp b/test/CodeGenCXX/inline-functions.cpp index 8d046a2f4a..63a523a9de 100644 --- a/test/CodeGenCXX/inline-functions.cpp +++ b/test/CodeGenCXX/inline-functions.cpp @@ -21,3 +21,11 @@ void B<char>::f() { } // CHECK: define void @_Z1fv void f() { } + +// <rdar://problem/8740363> +inline void f1(int); + +// CHECK: define linkonce_odr void @_Z2f1i +void f1(int) { } + +void test_f1() { f1(17); } |