1 // RUN: %clang_cc1 -O2 -fvisibility hidden -std=c++11 -emit-llvm -o - -triple x86_64-apple-darwin10 %s | FileCheck %s 2 3 // Ensure that available_externally functions eliminated at -O2 are now 4 // declarations, and are not emitted as hidden with -fvisibility=hidden, 5 // but rather with default visibility. 6 struct Filter { 7 virtual void Foo(); 8 int a; 9 }; 10 11 class Message{}; 12 class Sender { 13 public: 14 virtual bool Send(Message* msg) = 0; 15 16 protected: ~Sender()17 virtual ~Sender() {} 18 }; 19 20 // CHECK: declare zeroext i1 @_ZThn16_N17SyncMessageFilter4SendEP7Message 21 class SyncMessageFilter : public Filter, public Sender { 22 public: 23 bool Send(Message* message) override; 24 }; 25 26 class TestSyncMessageFilter : public SyncMessageFilter { 27 }; 28 main()29int main() { 30 TestSyncMessageFilter *f = new TestSyncMessageFilter; 31 f->Send(new Message); 32 } 33