Mercurial > hg > CbC > CbC_llvm
view clang/test/CodeGen/available-externally-hidden.cpp @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 |
parents | 1d019706d866 |
children | c4bab56944e8 |
line wrap: on
line source
// RUN: %clang_cc1 -O2 -fvisibility hidden -std=c++11 -emit-llvm -o - -triple x86_64-apple-darwin10 %s | FileCheck %s // Ensure that available_externally functions eliminated at -O2 are now // declarations, and are not emitted as hidden with -fvisibility=hidden, // but rather with default visibility. struct Filter { virtual void Foo(); int a; }; class Message{}; class Sender { public: virtual bool Send(Message* msg) = 0; protected: virtual ~Sender() {} }; // CHECK: declare zeroext i1 @_ZThn16_N17SyncMessageFilter4SendEP7Message class SyncMessageFilter : public Filter, public Sender { public: bool Send(Message* message) override; }; class TestSyncMessageFilter : public SyncMessageFilter { }; int main() { TestSyncMessageFilter *f = new TestSyncMessageFilter; f->Send(new Message); }