111
|
1 /* { dg-do compile } */
|
|
2 /* { dg-options "-std=c++11 -O2" } */
|
131
|
3 /* { dg-additional-options "-Wno-return-type" } */
|
111
|
4
|
|
5 __extension__ typedef unsigned long long int uint64_t;
|
|
6 namespace std __attribute__ ((__visibility__ ("default")))
|
|
7 {
|
|
8 typedef enum memory_order
|
|
9 {
|
|
10 memory_order_seq_cst
|
|
11 } memory_order;
|
|
12 }
|
|
13
|
|
14 namespace std __attribute__ ((__visibility__ ("default")))
|
|
15 {
|
|
16 template < typename _Tp > struct atomic
|
|
17 {
|
|
18 static constexpr int _S_min_alignment
|
|
19 = (sizeof (_Tp) & (sizeof (_Tp) - 1)) || sizeof (_Tp) > 16
|
|
20 ? 0 : sizeof (_Tp);
|
|
21 static constexpr int _S_alignment
|
|
22 = _S_min_alignment > alignof (_Tp) ? _S_min_alignment : alignof (_Tp);
|
|
23 alignas (_S_alignment) _Tp _M_i;
|
|
24 operator _Tp () const noexcept
|
|
25 {
|
|
26 return load ();
|
|
27 }
|
|
28 _Tp load (memory_order __m = memory_order_seq_cst) const noexcept
|
|
29 {
|
|
30 _Tp tmp;
|
|
31 __atomic_load (&_M_i, &tmp, __m);
|
|
32 }
|
|
33 };
|
|
34 }
|
|
35
|
|
36 namespace lldb_private
|
|
37 {
|
|
38 namespace imp
|
|
39 {
|
|
40 }
|
|
41 class Address;
|
|
42 }
|
|
43 namespace lldb
|
|
44 {
|
|
45 typedef uint64_t addr_t;
|
|
46 class SBSection
|
|
47 {
|
|
48 };
|
|
49 class SBAddress
|
|
50 {
|
|
51 void SetAddress (lldb::SBSection section, lldb::addr_t offset);
|
|
52 lldb_private::Address & ref ();
|
|
53 };
|
|
54 }
|
|
55 namespace lldb_private
|
|
56 {
|
|
57 class Address
|
|
58 {
|
|
59 public:
|
|
60 const Address & SetOffset (lldb::addr_t offset)
|
|
61 {
|
|
62 bool changed = m_offset != offset;
|
|
63 }
|
|
64 std::atomic < lldb::addr_t > m_offset;
|
|
65 };
|
|
66 }
|
|
67
|
|
68 using namespace lldb;
|
|
69 using namespace lldb_private;
|
|
70 void
|
|
71 SBAddress::SetAddress (lldb::SBSection section, lldb::addr_t offset)
|
|
72 {
|
|
73 Address & addr = ref ();
|
|
74 addr.SetOffset (offset);
|
|
75 }
|