Last active
September 1, 2021 11:57
-
-
Save parkovski/417d7fab4620600e42c1ffda0df866df to your computer and use it in GitHub Desktop.
"Trait" vtables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
class PartialEq { | |
public: | |
virtual bool eq(PartialEq *const) const = 0; | |
}; | |
class PartialOrd { | |
public: | |
virtual int partial_cmp(PartialOrd *const) const = 0; | |
}; | |
class Display { | |
public: | |
// Using C APIs to avoid cluttering the vtable output, | |
// so this just calls printf. | |
virtual void display() const = 0; | |
}; | |
//================== | |
class IntStorage | |
: public virtual PartialEq, | |
public virtual PartialOrd, | |
public virtual Display | |
{ | |
public: | |
virtual void set_value(int value) = 0; | |
virtual int get_value() const = 0; | |
}; | |
class PhraseOfTheDay : public virtual Display, public virtual PartialEq { | |
public: | |
virtual void set_phrase(char const *const phrase) = 0; | |
}; | |
class HowGoodIsToday | |
: public virtual PhraseOfTheDay, | |
public virtual IntStorage | |
{ | |
char const * phrase; | |
int i; | |
public: | |
HowGoodIsToday() | |
: phrase( | |
"On a scale of 1 to 10, today is a(n) %d!\n" | |
), | |
i(0) | |
{} | |
// impl PartialEq | |
virtual bool eq(PartialEq *const _other) const override { | |
auto other = dynamic_cast<HowGoodIsToday *const>(_other); | |
return this->i == other->i && this->phrase == other->phrase; | |
} | |
// impl PartialOrd | |
virtual int partial_cmp(PartialOrd *const _other) const override { | |
auto other = dynamic_cast<HowGoodIsToday *const>(_other); | |
if (this->i > other->i) return 1; | |
else if (this->i < other->i) return -1; | |
return 0; | |
} | |
// impl Display | |
virtual void display() const override { | |
printf(phrase, this->i); | |
} | |
// impl PhraseOfTheDay | |
virtual void set_phrase(char const *const phrase) override { | |
this->phrase = phrase; | |
} | |
// impl IntStorage | |
virtual void set_value(int value) override { | |
this->i = value; | |
} | |
virtual int get_value() const override { | |
return this->i; | |
} | |
}; | |
PartialOrd *const get_larger(PartialOrd *const first, PartialOrd *const second) { | |
if (first->partial_cmp(second) > 0) { | |
return first; | |
} | |
return second; | |
} | |
void show(Display *const disp) { | |
disp->display(); | |
} | |
void show_best_day(HowGoodIsToday *const day1, HowGoodIsToday *const day2) { | |
auto const day = dynamic_cast<HowGoodIsToday *const>(get_larger(day1, day2)); | |
show(day); | |
} | |
int main() { | |
auto ok_day = HowGoodIsToday(); | |
auto better_day = HowGoodIsToday(); | |
ok_day.set_value(6); | |
better_day.set_value(20); | |
better_day.set_phrase("Today is awesome because I found %d dollars!\n"); | |
show_best_day(&ok_day, &better_day); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vtable for 'PartialOrd' (3 entries). | |
0 | offset_to_top (0) | |
1 | PartialOrd RTTI | |
-- (PartialOrd, 0) vtable address -- | |
2 | int PartialOrd::partial_cmp(PartialOrd *const) const [pure] | |
VTable indices for 'PartialOrd' (1 entries). | |
0 | int PartialOrd::partial_cmp(PartialOrd *const) const | |
Vtable for 'Display' (3 entries). | |
0 | offset_to_top (0) | |
1 | Display RTTI | |
-- (Display, 0) vtable address -- | |
2 | void Display::display() const [pure] | |
VTable indices for 'Display' (1 entries). | |
0 | void Display::display() const | |
Vtable for 'HowGoodIsToday' (30 entries). | |
0 | vbase_offset (32) | |
1 | vbase_offset (24) | |
2 | vbase_offset (0) | |
3 | vcall_offset (0) | |
4 | vbase_offset (24) | |
5 | vbase_offset (0) | |
6 | vcall_offset (0) | |
7 | offset_to_top (0) | |
8 | HowGoodIsToday RTTI | |
-- (Display, 0) vtable address -- | |
-- (HowGoodIsToday, 0) vtable address -- | |
-- (PhraseOfTheDay, 0) vtable address -- | |
9 | void HowGoodIsToday::display() const | |
10 | void HowGoodIsToday::set_phrase(const char *const) | |
11 | bool HowGoodIsToday::eq(PartialEq *const) const | |
12 | int HowGoodIsToday::partial_cmp(PartialOrd *const) const | |
13 | void HowGoodIsToday::set_value(int) | |
14 | int HowGoodIsToday::get_value() const | |
15 | vcall_offset (-24) | |
16 | vcall_offset (-24) | |
17 | vbase_offset (-24) | |
18 | vbase_offset (8) | |
19 | vbase_offset (0) | |
20 | vcall_offset (-24) | |
21 | offset_to_top (-24) | |
22 | HowGoodIsToday RTTI | |
-- (IntStorage, 24) vtable address -- | |
-- (PartialEq, 24) vtable address -- | |
23 | bool HowGoodIsToday::eq(PartialEq *const) const | |
[this adjustment: 0 non-virtual, -24 vcall offset offset] | |
24 | void HowGoodIsToday::set_value(int) | |
[this adjustment: 0 non-virtual, -56 vcall offset offset] | |
25 | int HowGoodIsToday::get_value() const | |
[this adjustment: 0 non-virtual, -64 vcall offset offset] | |
26 | vcall_offset (-32) | |
27 | offset_to_top (-32) | |
28 | HowGoodIsToday RTTI | |
-- (PartialOrd, 32) vtable address -- | |
29 | int HowGoodIsToday::partial_cmp(PartialOrd *const) const | |
[this adjustment: 0 non-virtual, -24 vcall offset offset] | |
Virtual base offset offsets for 'HowGoodIsToday' (5 entries). | |
Display | -32 | |
IntStorage | -64 | |
PartialEq | -40 | |
PartialOrd | -72 | |
PhraseOfTheDay | -56 | |
Thunks for 'bool HowGoodIsToday::eq(PartialEq *const) const' (1 entry). | |
0 | this adjustment: 0 non-virtual, -24 vcall offset offset | |
Thunks for 'int HowGoodIsToday::get_value() const' (1 entry). | |
0 | this adjustment: 0 non-virtual, -64 vcall offset offset | |
Thunks for 'int HowGoodIsToday::partial_cmp(PartialOrd *const) const' (1 entry). | |
0 | this adjustment: 0 non-virtual, -24 vcall offset offset | |
Thunks for 'void HowGoodIsToday::display() const' (1 entry). | |
0 | this adjustment: 0 non-virtual, -24 vcall offset offset | |
Thunks for 'void HowGoodIsToday::set_phrase(const char *const)' (1 entry). | |
0 | this adjustment: 0 non-virtual, -48 vcall offset offset | |
Thunks for 'void HowGoodIsToday::set_value(int)' (1 entry). | |
0 | this adjustment: 0 non-virtual, -56 vcall offset offset | |
VTable indices for 'HowGoodIsToday' (6 entries). | |
0 | void HowGoodIsToday::display() const | |
1 | void HowGoodIsToday::set_phrase(const char *const) | |
2 | bool HowGoodIsToday::eq(PartialEq *const) const | |
3 | int HowGoodIsToday::partial_cmp(PartialOrd *const) const | |
4 | void HowGoodIsToday::set_value(int) | |
5 | int HowGoodIsToday::get_value() const | |
Construction vtable for ('PhraseOfTheDay', 0) in 'HowGoodIsToday' (12 entries). | |
0 | vcall_offset (0) | |
1 | vbase_offset (24) | |
2 | vbase_offset (0) | |
3 | vcall_offset (0) | |
4 | offset_to_top (0) | |
5 | PhraseOfTheDay RTTI | |
-- (Display, 0) vtable address -- | |
-- (PhraseOfTheDay, 0) vtable address -- | |
6 | void Display::display() const [pure] | |
7 | void PhraseOfTheDay::set_phrase(const char *const) [pure] | |
8 | vcall_offset (0) | |
9 | offset_to_top (-24) | |
10 | PhraseOfTheDay RTTI | |
-- (PartialEq, 24) vtable address -- | |
11 | bool PartialEq::eq(PartialEq *const) const [pure] | |
Construction vtable for ('IntStorage', 24) in 'HowGoodIsToday' (19 entries). | |
0 | vcall_offset (0) | |
1 | vcall_offset (0) | |
2 | vbase_offset (-24) | |
3 | vbase_offset (8) | |
4 | vbase_offset (0) | |
5 | vcall_offset (0) | |
6 | offset_to_top (0) | |
7 | IntStorage RTTI | |
-- (IntStorage, 24) vtable address -- | |
-- (PartialEq, 24) vtable address -- | |
8 | bool PartialEq::eq(PartialEq *const) const [pure] | |
9 | void IntStorage::set_value(int) [pure] | |
10 | int IntStorage::get_value() const [pure] | |
11 | vcall_offset (0) | |
12 | offset_to_top (-8) | |
13 | IntStorage RTTI | |
-- (PartialOrd, 32) vtable address -- | |
14 | int PartialOrd::partial_cmp(PartialOrd *const) const [pure] | |
15 | vcall_offset (0) | |
16 | offset_to_top (24) | |
17 | IntStorage RTTI | |
-- (Display, 0) vtable address -- | |
18 | void Display::display() const [pure] | |
Vtable for 'PartialEq' (3 entries). | |
0 | offset_to_top (0) | |
1 | PartialEq RTTI | |
-- (PartialEq, 0) vtable address -- | |
2 | bool PartialEq::eq(PartialEq *const) const [pure] | |
VTable indices for 'PartialEq' (1 entries). | |
0 | bool PartialEq::eq(PartialEq *const) const |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class <anonymous struct> | |
size=8 align=4 | |
base size=8 base align=4 | |
<anonymous struct> (0x0x7f9cdc7bc720) 0 | |
Class <anonymous struct>::<anonymous union> | |
size=4 align=4 | |
base size=4 base align=4 | |
<anonymous struct>::<anonymous union> (0x0x7f9cdc7bc7e0) 0 | |
Class <anonymous struct> | |
size=8 align=4 | |
base size=8 base align=4 | |
<anonymous struct> (0x0x7f9cdc7bc780) 0 | |
Class <anonymous struct> | |
size=16 align=8 | |
base size=16 base align=8 | |
<anonymous struct> (0x0x7f9cdc7bc840) 0 | |
Class <anonymous struct> | |
size=16 align=8 | |
base size=16 base align=8 | |
<anonymous struct> (0x0x7f9cdc7bc8a0) 0 | |
Class _IO_marker | |
size=24 align=8 | |
base size=24 base align=8 | |
_IO_marker (0x0x7f9cdc7bc900) 0 | |
Class _IO_FILE | |
size=216 align=8 | |
base size=216 base align=8 | |
_IO_FILE (0x0x7f9cdc7bc960) 0 | |
Class <anonymous struct> | |
size=32 align=8 | |
base size=32 base align=8 | |
<anonymous struct> (0x0x7f9cdc7bc9c0) 0 | |
Vtable for PartialEq | |
PartialEq::_ZTV9PartialEq: 3u entries | |
0 (int (*)(...))0 | |
8 (int (*)(...))(& _ZTI9PartialEq) | |
16 (int (*)(...))__cxa_pure_virtual | |
Class PartialEq | |
size=8 align=8 | |
base size=8 base align=8 | |
PartialEq (0x0x7f9cdc7bca20) 0 nearly-empty | |
vptr=((& PartialEq::_ZTV9PartialEq) + 16u) | |
Vtable for PartialOrd | |
PartialOrd::_ZTV10PartialOrd: 3u entries | |
0 (int (*)(...))0 | |
8 (int (*)(...))(& _ZTI10PartialOrd) | |
16 (int (*)(...))__cxa_pure_virtual | |
Class PartialOrd | |
size=8 align=8 | |
base size=8 base align=8 | |
PartialOrd (0x0x7f9cdc7bca80) 0 nearly-empty | |
vptr=((& PartialOrd::_ZTV10PartialOrd) + 16u) | |
Vtable for Display | |
Display::_ZTV7Display: 3u entries | |
0 (int (*)(...))0 | |
8 (int (*)(...))(& _ZTI7Display) | |
16 (int (*)(...))__cxa_pure_virtual | |
Class Display | |
size=8 align=8 | |
base size=8 base align=8 | |
Display (0x0x7f9cdc7bcae0) 0 nearly-empty | |
vptr=((& Display::_ZTV7Display) + 16u) | |
Vtable for IntStorage | |
IntStorage::_ZTV10IntStorage: 17u entries | |
0 16u | |
8 8u | |
16 0u | |
24 0u | |
32 (int (*)(...))0 | |
40 (int (*)(...))(& _ZTI10IntStorage) | |
48 (int (*)(...))__cxa_pure_virtual | |
56 (int (*)(...))__cxa_pure_virtual | |
64 (int (*)(...))__cxa_pure_virtual | |
72 0u | |
80 (int (*)(...))-8 | |
88 (int (*)(...))(& _ZTI10IntStorage) | |
96 (int (*)(...))__cxa_pure_virtual | |
104 0u | |
112 (int (*)(...))-16 | |
120 (int (*)(...))(& _ZTI10IntStorage) | |
128 (int (*)(...))__cxa_pure_virtual | |
VTT for IntStorage | |
IntStorage::_ZTT10IntStorage: 4u entries | |
0 ((& IntStorage::_ZTV10IntStorage) + 48u) | |
8 ((& IntStorage::_ZTV10IntStorage) + 48u) | |
16 ((& IntStorage::_ZTV10IntStorage) + 96u) | |
24 ((& IntStorage::_ZTV10IntStorage) + 128u) | |
Class IntStorage | |
size=24 align=8 | |
base size=8 base align=8 | |
IntStorage (0x0x7f9cde050348) 0 nearly-empty | |
vptridx=0u vptr=((& IntStorage::_ZTV10IntStorage) + 48u) | |
PartialEq (0x0x7f9cdc7bcb40) 0 nearly-empty virtual | |
primary-for IntStorage (0x0x7f9cde050348) | |
vptridx=8u vbaseoffset=-32 | |
PartialOrd (0x0x7f9cdc7bcba0) 8 nearly-empty virtual | |
vptridx=16u vbaseoffset=-40 vptr=((& IntStorage::_ZTV10IntStorage) + 96u) | |
Display (0x0x7f9cdc7bcc00) 16 nearly-empty virtual | |
vptridx=24u vbaseoffset=-48 vptr=((& IntStorage::_ZTV10IntStorage) + 128u) | |
Vtable for PhraseOfTheDay | |
PhraseOfTheDay::_ZTV14PhraseOfTheDay: 11u entries | |
0 8u | |
8 0u | |
16 0u | |
24 (int (*)(...))0 | |
32 (int (*)(...))(& _ZTI14PhraseOfTheDay) | |
40 (int (*)(...))__cxa_pure_virtual | |
48 (int (*)(...))__cxa_pure_virtual | |
56 0u | |
64 (int (*)(...))-8 | |
72 (int (*)(...))(& _ZTI14PhraseOfTheDay) | |
80 (int (*)(...))__cxa_pure_virtual | |
VTT for PhraseOfTheDay | |
PhraseOfTheDay::_ZTT14PhraseOfTheDay: 3u entries | |
0 ((& PhraseOfTheDay::_ZTV14PhraseOfTheDay) + 40u) | |
8 ((& PhraseOfTheDay::_ZTV14PhraseOfTheDay) + 40u) | |
16 ((& PhraseOfTheDay::_ZTV14PhraseOfTheDay) + 80u) | |
Class PhraseOfTheDay | |
size=16 align=8 | |
base size=8 base align=8 | |
PhraseOfTheDay (0x0x7f9cdc67ecb0) 0 nearly-empty | |
vptridx=0u vptr=((& PhraseOfTheDay::_ZTV14PhraseOfTheDay) + 40u) | |
Display (0x0x7f9cdc7bcc60) 0 nearly-empty virtual | |
primary-for PhraseOfTheDay (0x0x7f9cdc67ecb0) | |
vptridx=8u vbaseoffset=-32 | |
PartialEq (0x0x7f9cdc7bccc0) 8 nearly-empty virtual | |
vptridx=16u vbaseoffset=-40 vptr=((& PhraseOfTheDay::_ZTV14PhraseOfTheDay) + 80u) | |
Vtable for HowGoodIsToday | |
HowGoodIsToday::_ZTV14HowGoodIsToday: 30u entries | |
0 32u | |
8 24u | |
16 0u | |
24 0u | |
32 24u | |
40 0u | |
48 0u | |
56 (int (*)(...))0 | |
64 (int (*)(...))(& _ZTI14HowGoodIsToday) | |
72 (int (*)(...))HowGoodIsToday::display | |
80 (int (*)(...))HowGoodIsToday::set_phrase | |
88 (int (*)(...))HowGoodIsToday::eq | |
96 (int (*)(...))HowGoodIsToday::partial_cmp | |
104 (int (*)(...))HowGoodIsToday::set_value | |
112 (int (*)(...))HowGoodIsToday::get_value | |
120 18446744073709551592u | |
128 18446744073709551592u | |
136 18446744073709551592u | |
144 8u | |
152 0u | |
160 18446744073709551592u | |
168 (int (*)(...))-24 | |
176 (int (*)(...))(& _ZTI14HowGoodIsToday) | |
184 (int (*)(...))HowGoodIsToday::_ZTv0_n24_NK14HowGoodIsToday2eqEP9PartialEq | |
192 (int (*)(...))HowGoodIsToday::_ZTv0_n56_N14HowGoodIsToday9set_valueEi | |
200 (int (*)(...))HowGoodIsToday::_ZTv0_n64_NK14HowGoodIsToday9get_valueEv | |
208 18446744073709551584u | |
216 (int (*)(...))-32 | |
224 (int (*)(...))(& _ZTI14HowGoodIsToday) | |
232 (int (*)(...))HowGoodIsToday::_ZTv0_n24_NK14HowGoodIsToday11partial_cmpEP10PartialOrd | |
Construction vtable for PhraseOfTheDay in HowGoodIsToday | |
HowGoodIsToday::_ZTC14HowGoodIsToday0_14PhraseOfTheDay: 11u entries | |
0 24u | |
8 0u | |
16 0u | |
24 (int (*)(...))0 | |
32 (int (*)(...))(& _ZTI14PhraseOfTheDay) | |
40 (int (*)(...))__cxa_pure_virtual | |
48 (int (*)(...))__cxa_pure_virtual | |
56 0u | |
64 (int (*)(...))-24 | |
72 (int (*)(...))(& _ZTI14PhraseOfTheDay) | |
80 (int (*)(...))__cxa_pure_virtual | |
Construction vtable for IntStorage in HowGoodIsToday | |
HowGoodIsToday::_ZTC14HowGoodIsToday24_10IntStorage: 17u entries | |
0 18446744073709551592u | |
8 8u | |
16 0u | |
24 0u | |
32 (int (*)(...))0 | |
40 (int (*)(...))(& _ZTI10IntStorage) | |
48 (int (*)(...))__cxa_pure_virtual | |
56 (int (*)(...))__cxa_pure_virtual | |
64 (int (*)(...))__cxa_pure_virtual | |
72 0u | |
80 (int (*)(...))-8 | |
88 (int (*)(...))(& _ZTI10IntStorage) | |
96 (int (*)(...))__cxa_pure_virtual | |
104 0u | |
112 (int (*)(...))24 | |
120 (int (*)(...))(& _ZTI10IntStorage) | |
128 (int (*)(...))__cxa_pure_virtual | |
VTT for HowGoodIsToday | |
HowGoodIsToday::_ZTT14HowGoodIsToday: 13u entries | |
0 ((& HowGoodIsToday::_ZTV14HowGoodIsToday) + 72u) | |
8 ((& HowGoodIsToday::_ZTV14HowGoodIsToday) + 72u) | |
16 ((& HowGoodIsToday::_ZTV14HowGoodIsToday) + 72u) | |
24 ((& HowGoodIsToday::_ZTV14HowGoodIsToday) + 184u) | |
32 ((& HowGoodIsToday::_ZTV14HowGoodIsToday) + 184u) | |
40 ((& HowGoodIsToday::_ZTV14HowGoodIsToday) + 232u) | |
48 ((& HowGoodIsToday::_ZTC14HowGoodIsToday0_14PhraseOfTheDay) + 40u) | |
56 ((& HowGoodIsToday::_ZTC14HowGoodIsToday0_14PhraseOfTheDay) + 40u) | |
64 ((& HowGoodIsToday::_ZTC14HowGoodIsToday0_14PhraseOfTheDay) + 80u) | |
72 ((& HowGoodIsToday::_ZTC14HowGoodIsToday24_10IntStorage) + 48u) | |
80 ((& HowGoodIsToday::_ZTC14HowGoodIsToday24_10IntStorage) + 48u) | |
88 ((& HowGoodIsToday::_ZTC14HowGoodIsToday24_10IntStorage) + 96u) | |
96 ((& HowGoodIsToday::_ZTC14HowGoodIsToday24_10IntStorage) + 128u) | |
Class HowGoodIsToday | |
size=40 align=8 | |
base size=20 base align=8 | |
HowGoodIsToday (0x0x7f9cdc67ed90) 0 | |
vptridx=0u vptr=((& HowGoodIsToday::_ZTV14HowGoodIsToday) + 72u) | |
PhraseOfTheDay (0x0x7f9cdc67ee00) 0 nearly-empty virtual | |
primary-for HowGoodIsToday (0x0x7f9cdc67ed90) | |
subvttidx=48u vptridx=8u vbaseoffset=-56 | |
Display (0x0x7f9cdc7bcd20) 0 nearly-empty virtual | |
primary-for PhraseOfTheDay (0x0x7f9cdc67ee00) | |
vptridx=16u vbaseoffset=-32 | |
PartialEq (0x0x7f9cdc7bcd80) 24 nearly-empty virtual | |
primary-for IntStorage (0x0x7f9cde0503c0) | |
vptridx=24u vbaseoffset=-40 | |
IntStorage (0x0x7f9cde0503c0) 24 nearly-empty virtual | |
subvttidx=72u vptridx=32u vbaseoffset=-64 vptr=((& HowGoodIsToday::_ZTV14HowGoodIsToday) + 184u) | |
PartialEq (0x0x7f9cdc7bcd80) alternative-path | |
PartialOrd (0x0x7f9cdc7bcde0) 32 nearly-empty virtual | |
vptridx=40u vbaseoffset=-72 vptr=((& HowGoodIsToday::_ZTV14HowGoodIsToday) + 232u) | |
Display (0x0x7f9cdc7bcd20) alternative-path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ModuleID = 'traits.cpp' | |
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-pc-linux-gnu" | |
%class.PartialOrd = type { i32 (...)** } | |
%class.Display = type { i32 (...)** } | |
%class.HowGoodIsToday = type <{ %class.PhraseOfTheDay.base, i8*, i32, [4 x i8], %class.IntStorage.base, %class.PartialOrd }> | |
%class.PhraseOfTheDay.base = type { %class.Display } | |
%class.IntStorage.base = type { %class.PartialEq } | |
%class.PartialEq = type { i32 (...)** } | |
%class.PhraseOfTheDay = type { %class.Display, %class.PartialEq } | |
%class.IntStorage = type { %class.PartialEq, %class.PartialOrd, %class.Display } | |
$_ZN14HowGoodIsTodayC1Ev = comdat any | |
$_ZN14HowGoodIsToday9set_valueEi = comdat any | |
$_ZN14HowGoodIsToday10set_phraseEPKc = comdat any | |
$_ZN7DisplayC2Ev = comdat any | |
$_ZN9PartialEqC2Ev = comdat any | |
$_ZN14PhraseOfTheDayC2Ev = comdat any | |
$_ZN10PartialOrdC2Ev = comdat any | |
$_ZN10IntStorageC2Ev = comdat any | |
$_ZNK14HowGoodIsToday7displayEv = comdat any | |
$_ZNK14HowGoodIsToday2eqEP9PartialEq = comdat any | |
$_ZNK14HowGoodIsToday11partial_cmpEP10PartialOrd = comdat any | |
$_ZNK14HowGoodIsToday9get_valueEv = comdat any | |
$_ZTv0_n24_NK14HowGoodIsToday2eqEP9PartialEq = comdat any | |
$_ZTv0_n56_N14HowGoodIsToday9set_valueEi = comdat any | |
$_ZTv0_n64_NK14HowGoodIsToday9get_valueEv = comdat any | |
$_ZTv0_n24_NK14HowGoodIsToday11partial_cmpEP10PartialOrd = comdat any | |
$_ZTv0_n24_NK14HowGoodIsToday7displayEv = comdat any | |
$_ZTv0_n48_N14HowGoodIsToday10set_phraseEPKc = comdat any | |
$_ZTS10PartialOrd = comdat any | |
$_ZTI10PartialOrd = comdat any | |
$_ZTS14HowGoodIsToday = comdat any | |
$_ZTS14PhraseOfTheDay = comdat any | |
$_ZTS7Display = comdat any | |
$_ZTI7Display = comdat any | |
$_ZTS9PartialEq = comdat any | |
$_ZTI9PartialEq = comdat any | |
$_ZTI14PhraseOfTheDay = comdat any | |
$_ZTS10IntStorage = comdat any | |
$_ZTI10IntStorage = comdat any | |
$_ZTI14HowGoodIsToday = comdat any | |
$_ZTV14HowGoodIsToday = comdat any | |
$_ZTT14HowGoodIsToday = comdat any | |
$_ZTC14HowGoodIsToday0_14PhraseOfTheDay = comdat any | |
$_ZTC14HowGoodIsToday24_10IntStorage = comdat any | |
$_ZTV7Display = comdat any | |
$_ZTV9PartialEq = comdat any | |
$_ZTV10PartialOrd = comdat any | |
@_ZTVN10__cxxabiv117__class_type_infoE = external global i8* | |
@_ZTS10PartialOrd = linkonce_odr constant [13 x i8] c"10PartialOrd\00", comdat | |
@_ZTI10PartialOrd = linkonce_odr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv117__class_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @_ZTS10PartialOrd, i32 0, i32 0) }, comdat | |
@_ZTVN10__cxxabiv121__vmi_class_type_infoE = external global i8* | |
@_ZTS14HowGoodIsToday = linkonce_odr constant [17 x i8] c"14HowGoodIsToday\00", comdat | |
@_ZTS14PhraseOfTheDay = linkonce_odr constant [17 x i8] c"14PhraseOfTheDay\00", comdat | |
@_ZTS7Display = linkonce_odr constant [9 x i8] c"7Display\00", comdat | |
@_ZTI7Display = linkonce_odr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv117__class_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @_ZTS7Display, i32 0, i32 0) }, comdat | |
@_ZTS9PartialEq = linkonce_odr constant [11 x i8] c"9PartialEq\00", comdat | |
@_ZTI9PartialEq = linkonce_odr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv117__class_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @_ZTS9PartialEq, i32 0, i32 0) }, comdat | |
@_ZTI14PhraseOfTheDay = linkonce_odr constant { i8*, i8*, i32, i32, i8*, i64, i8*, i64 } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv121__vmi_class_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @_ZTS14PhraseOfTheDay, i32 0, i32 0), i32 0, i32 2, i8* bitcast ({ i8*, i8* }* @_ZTI7Display to i8*), i64 -8189, i8* bitcast ({ i8*, i8* }* @_ZTI9PartialEq to i8*), i64 -10237 }, comdat | |
@_ZTS10IntStorage = linkonce_odr constant [13 x i8] c"10IntStorage\00", comdat | |
@_ZTI10IntStorage = linkonce_odr constant { i8*, i8*, i32, i32, i8*, i64, i8*, i64, i8*, i64 } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv121__vmi_class_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @_ZTS10IntStorage, i32 0, i32 0), i32 0, i32 3, i8* bitcast ({ i8*, i8* }* @_ZTI9PartialEq to i8*), i64 -8189, i8* bitcast ({ i8*, i8* }* @_ZTI10PartialOrd to i8*), i64 -10237, i8* bitcast ({ i8*, i8* }* @_ZTI7Display to i8*), i64 -12285 }, comdat | |
@_ZTI14HowGoodIsToday = linkonce_odr constant { i8*, i8*, i32, i32, i8*, i64, i8*, i64 } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv121__vmi_class_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @_ZTS14HowGoodIsToday, i32 0, i32 0), i32 2, i32 2, i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64 }* @_ZTI14PhraseOfTheDay to i8*), i64 -14333, i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64, i8*, i64 }* @_ZTI10IntStorage to i8*), i64 -16381 }, comdat | |
@.str = private unnamed_addr constant [46 x i8] c"Today is awesome because I found %d dollars!\0A\00", align 1 | |
@_ZTV14HowGoodIsToday = linkonce_odr unnamed_addr constant [30 x i8*] [i8* inttoptr (i64 32 to i8*), i8* inttoptr (i64 24 to i8*), i8* null, i8* null, i8* inttoptr (i64 24 to i8*), i8* null, i8* null, i8* null, i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64 }* @_ZTI14HowGoodIsToday to i8*), i8* bitcast (void (%class.HowGoodIsToday*)* @_ZNK14HowGoodIsToday7displayEv to i8*), i8* bitcast (void (%class.HowGoodIsToday*, i8*)* @_ZN14HowGoodIsToday10set_phraseEPKc to i8*), i8* bitcast (i1 (%class.HowGoodIsToday*, %class.PartialEq*)* @_ZNK14HowGoodIsToday2eqEP9PartialEq to i8*), i8* bitcast (i32 (%class.HowGoodIsToday*, %class.PartialOrd*)* @_ZNK14HowGoodIsToday11partial_cmpEP10PartialOrd to i8*), i8* bitcast (void (%class.HowGoodIsToday*, i32)* @_ZN14HowGoodIsToday9set_valueEi to i8*), i8* bitcast (i32 (%class.HowGoodIsToday*)* @_ZNK14HowGoodIsToday9get_valueEv to i8*), i8* inttoptr (i64 -24 to i8*), i8* inttoptr (i64 -24 to i8*), i8* inttoptr (i64 -24 to i8*), i8* inttoptr (i64 8 to i8*), i8* null, i8* inttoptr (i64 -24 to i8*), i8* inttoptr (i64 -24 to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64 }* @_ZTI14HowGoodIsToday to i8*), i8* bitcast (i1 (%class.HowGoodIsToday*, %class.PartialEq*)* @_ZTv0_n24_NK14HowGoodIsToday2eqEP9PartialEq to i8*), i8* bitcast (void (%class.HowGoodIsToday*, i32)* @_ZTv0_n56_N14HowGoodIsToday9set_valueEi to i8*), i8* bitcast (i32 (%class.HowGoodIsToday*)* @_ZTv0_n64_NK14HowGoodIsToday9get_valueEv to i8*), i8* inttoptr (i64 -32 to i8*), i8* inttoptr (i64 -32 to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64 }* @_ZTI14HowGoodIsToday to i8*), i8* bitcast (i32 (%class.HowGoodIsToday*, %class.PartialOrd*)* @_ZTv0_n24_NK14HowGoodIsToday11partial_cmpEP10PartialOrd to i8*)], comdat, align 8 | |
@_ZTT14HowGoodIsToday = linkonce_odr unnamed_addr constant [13 x i8*] [i8* bitcast (i8** getelementptr inbounds ([30 x i8*], [30 x i8*]* @_ZTV14HowGoodIsToday, i64 0, i64 9) to i8*), i8* bitcast (i8** getelementptr inbounds ([30 x i8*], [30 x i8*]* @_ZTV14HowGoodIsToday, i64 0, i64 9) to i8*), i8* bitcast (i8** getelementptr inbounds ([30 x i8*], [30 x i8*]* @_ZTV14HowGoodIsToday, i64 0, i64 9) to i8*), i8* bitcast (i8** getelementptr inbounds ([30 x i8*], [30 x i8*]* @_ZTV14HowGoodIsToday, i64 0, i64 23) to i8*), i8* bitcast (i8** getelementptr inbounds ([30 x i8*], [30 x i8*]* @_ZTV14HowGoodIsToday, i64 0, i64 23) to i8*), i8* bitcast (i8** getelementptr inbounds ([30 x i8*], [30 x i8*]* @_ZTV14HowGoodIsToday, i64 0, i64 29) to i8*), i8* bitcast (i8** getelementptr inbounds ([12 x i8*], [12 x i8*]* @_ZTC14HowGoodIsToday0_14PhraseOfTheDay, i64 0, i64 6) to i8*), i8* bitcast (i8** getelementptr inbounds ([12 x i8*], [12 x i8*]* @_ZTC14HowGoodIsToday0_14PhraseOfTheDay, i64 0, i64 6) to i8*), i8* bitcast (i8** getelementptr inbounds ([12 x i8*], [12 x i8*]* @_ZTC14HowGoodIsToday0_14PhraseOfTheDay, i64 0, i64 11) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*], [19 x i8*]* @_ZTC14HowGoodIsToday24_10IntStorage, i64 0, i64 8) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*], [19 x i8*]* @_ZTC14HowGoodIsToday24_10IntStorage, i64 0, i64 8) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*], [19 x i8*]* @_ZTC14HowGoodIsToday24_10IntStorage, i64 0, i64 14) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*], [19 x i8*]* @_ZTC14HowGoodIsToday24_10IntStorage, i64 0, i64 18) to i8*)], comdat | |
@.str.1 = private unnamed_addr constant [42 x i8] c"On a scale of 1 to 10, today is a(n) %d!\0A\00", align 1 | |
@_ZTC14HowGoodIsToday0_14PhraseOfTheDay = linkonce_odr unnamed_addr constant [12 x i8*] [i8* null, i8* inttoptr (i64 24 to i8*), i8* null, i8* null, i8* null, i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64 }* @_ZTI14PhraseOfTheDay to i8*), i8* bitcast (void ()* @__cxa_pure_virtual to i8*), i8* bitcast (void ()* @__cxa_pure_virtual to i8*), i8* null, i8* inttoptr (i64 -24 to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64 }* @_ZTI14PhraseOfTheDay to i8*), i8* bitcast (void ()* @__cxa_pure_virtual to i8*)], comdat | |
@_ZTC14HowGoodIsToday24_10IntStorage = linkonce_odr unnamed_addr constant [19 x i8*] [i8* null, i8* null, i8* inttoptr (i64 -24 to i8*), i8* inttoptr (i64 8 to i8*), i8* null, i8* null, i8* null, i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64, i8*, i64 }* @_ZTI10IntStorage to i8*), i8* bitcast (void ()* @__cxa_pure_virtual to i8*), i8* bitcast (void ()* @__cxa_pure_virtual to i8*), i8* bitcast (void ()* @__cxa_pure_virtual to i8*), i8* null, i8* inttoptr (i64 -8 to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64, i8*, i64 }* @_ZTI10IntStorage to i8*), i8* bitcast (void ()* @__cxa_pure_virtual to i8*), i8* null, i8* inttoptr (i64 24 to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64, i8*, i64 }* @_ZTI10IntStorage to i8*), i8* bitcast (void ()* @__cxa_pure_virtual to i8*)], comdat | |
@_ZTV7Display = linkonce_odr unnamed_addr constant [3 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_ZTI7Display to i8*), i8* bitcast (void ()* @__cxa_pure_virtual to i8*)], comdat, align 8 | |
@_ZTV9PartialEq = linkonce_odr unnamed_addr constant [3 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_ZTI9PartialEq to i8*), i8* bitcast (void ()* @__cxa_pure_virtual to i8*)], comdat, align 8 | |
@_ZTV10PartialOrd = linkonce_odr unnamed_addr constant [3 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_ZTI10PartialOrd to i8*), i8* bitcast (void ()* @__cxa_pure_virtual to i8*)], comdat, align 8 | |
; Function Attrs: uwtable | |
define %class.PartialOrd* @_Z10get_largerP10PartialOrdS0_(%class.PartialOrd* %first, %class.PartialOrd* %second) #0 { | |
%1 = alloca %class.PartialOrd*, align 8 | |
%2 = alloca %class.PartialOrd*, align 8 | |
%3 = alloca %class.PartialOrd*, align 8 | |
store %class.PartialOrd* %first, %class.PartialOrd** %2, align 8 | |
store %class.PartialOrd* %second, %class.PartialOrd** %3, align 8 | |
%4 = load %class.PartialOrd*, %class.PartialOrd** %2, align 8 | |
%5 = bitcast %class.PartialOrd* %4 to i32 (%class.PartialOrd*, %class.PartialOrd*)*** | |
%6 = load i32 (%class.PartialOrd*, %class.PartialOrd*)**, i32 (%class.PartialOrd*, %class.PartialOrd*)*** %5, align 8 | |
%7 = getelementptr inbounds i32 (%class.PartialOrd*, %class.PartialOrd*)*, i32 (%class.PartialOrd*, %class.PartialOrd*)** %6, i64 0 | |
%8 = load i32 (%class.PartialOrd*, %class.PartialOrd*)*, i32 (%class.PartialOrd*, %class.PartialOrd*)** %7, align 8 | |
%9 = load %class.PartialOrd*, %class.PartialOrd** %3, align 8 | |
%10 = call i32 %8(%class.PartialOrd* %4, %class.PartialOrd* %9) | |
%11 = icmp sgt i32 %10, 0 | |
br i1 %11, label %12, label %14 | |
; <label>:12 ; preds = %0 | |
%13 = load %class.PartialOrd*, %class.PartialOrd** %2, align 8 | |
store %class.PartialOrd* %13, %class.PartialOrd** %1, align 8 | |
br label %16 | |
; <label>:14 ; preds = %0 | |
%15 = load %class.PartialOrd*, %class.PartialOrd** %3, align 8 | |
store %class.PartialOrd* %15, %class.PartialOrd** %1, align 8 | |
br label %16 | |
; <label>:16 ; preds = %14, %12 | |
%17 = load %class.PartialOrd*, %class.PartialOrd** %1, align 8 | |
ret %class.PartialOrd* %17 | |
} | |
; Function Attrs: uwtable | |
define void @_Z4showP7Display(%class.Display* %disp) #0 { | |
%1 = alloca %class.Display*, align 8 | |
store %class.Display* %disp, %class.Display** %1, align 8 | |
%2 = load %class.Display*, %class.Display** %1, align 8 | |
%3 = bitcast %class.Display* %2 to void (%class.Display*)*** | |
%4 = load void (%class.Display*)**, void (%class.Display*)*** %3, align 8 | |
%5 = getelementptr inbounds void (%class.Display*)*, void (%class.Display*)** %4, i64 0 | |
%6 = load void (%class.Display*)*, void (%class.Display*)** %5, align 8 | |
call void %6(%class.Display* %2) | |
ret void | |
} | |
; Function Attrs: uwtable | |
define void @_Z13show_best_dayP14HowGoodIsTodayS0_(%class.HowGoodIsToday* %day1, %class.HowGoodIsToday* %day2) #0 { | |
%1 = alloca %class.HowGoodIsToday*, align 8 | |
%2 = alloca %class.HowGoodIsToday*, align 8 | |
%day = alloca %class.HowGoodIsToday*, align 8 | |
store %class.HowGoodIsToday* %day1, %class.HowGoodIsToday** %1, align 8 | |
store %class.HowGoodIsToday* %day2, %class.HowGoodIsToday** %2, align 8 | |
%3 = load %class.HowGoodIsToday*, %class.HowGoodIsToday** %1, align 8 | |
%4 = icmp eq %class.HowGoodIsToday* %3, null | |
br i1 %4, label %14, label %5 | |
; <label>:5 ; preds = %0 | |
%6 = bitcast %class.HowGoodIsToday* %3 to i8** | |
%7 = load i8*, i8** %6, align 8 | |
%8 = getelementptr i8, i8* %7, i64 -72 | |
%9 = bitcast i8* %8 to i64* | |
%10 = load i64, i64* %9, align 8 | |
%11 = bitcast %class.HowGoodIsToday* %3 to i8* | |
%12 = getelementptr inbounds i8, i8* %11, i64 %10 | |
%13 = bitcast i8* %12 to %class.PartialOrd* | |
br label %14 | |
; <label>:14 ; preds = %5, %0 | |
%15 = phi %class.PartialOrd* [ %13, %5 ], [ null, %0 ] | |
%16 = load %class.HowGoodIsToday*, %class.HowGoodIsToday** %2, align 8 | |
%17 = icmp eq %class.HowGoodIsToday* %16, null | |
br i1 %17, label %27, label %18 | |
; <label>:18 ; preds = %14 | |
%19 = bitcast %class.HowGoodIsToday* %16 to i8** | |
%20 = load i8*, i8** %19, align 8 | |
%21 = getelementptr i8, i8* %20, i64 -72 | |
%22 = bitcast i8* %21 to i64* | |
%23 = load i64, i64* %22, align 8 | |
%24 = bitcast %class.HowGoodIsToday* %16 to i8* | |
%25 = getelementptr inbounds i8, i8* %24, i64 %23 | |
%26 = bitcast i8* %25 to %class.PartialOrd* | |
br label %27 | |
; <label>:27 ; preds = %18, %14 | |
%28 = phi %class.PartialOrd* [ %26, %18 ], [ null, %14 ] | |
%29 = call %class.PartialOrd* @_Z10get_largerP10PartialOrdS0_(%class.PartialOrd* %15, %class.PartialOrd* %28) | |
%30 = icmp eq %class.PartialOrd* %29, null | |
br i1 %30, label %35, label %31 | |
; <label>:31 ; preds = %27 | |
%32 = bitcast %class.PartialOrd* %29 to i8* | |
%33 = call i8* @__dynamic_cast(i8* %32, i8* bitcast ({ i8*, i8* }* @_ZTI10PartialOrd to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64 }* @_ZTI14HowGoodIsToday to i8*), i64 -1) #6 | |
%34 = bitcast i8* %33 to %class.HowGoodIsToday* | |
br label %36 | |
; <label>:35 ; preds = %27 | |
br label %36 | |
; <label>:36 ; preds = %35, %31 | |
%37 = phi %class.HowGoodIsToday* [ %34, %31 ], [ null, %35 ] | |
store %class.HowGoodIsToday* %37, %class.HowGoodIsToday** %day, align 8 | |
%38 = load %class.HowGoodIsToday*, %class.HowGoodIsToday** %day, align 8 | |
%39 = icmp eq %class.HowGoodIsToday* %38, null | |
br i1 %39, label %49, label %40 | |
; <label>:40 ; preds = %36 | |
%41 = bitcast %class.HowGoodIsToday* %38 to i8** | |
%42 = load i8*, i8** %41, align 8 | |
%43 = getelementptr i8, i8* %42, i64 -32 | |
%44 = bitcast i8* %43 to i64* | |
%45 = load i64, i64* %44, align 8 | |
%46 = bitcast %class.HowGoodIsToday* %38 to i8* | |
%47 = getelementptr inbounds i8, i8* %46, i64 %45 | |
%48 = bitcast i8* %47 to %class.Display* | |
br label %49 | |
; <label>:49 ; preds = %40, %36 | |
%50 = phi %class.Display* [ %48, %40 ], [ null, %36 ] | |
call void @_Z4showP7Display(%class.Display* %50) | |
ret void | |
} | |
; Function Attrs: nounwind readonly | |
declare i8* @__dynamic_cast(i8*, i8*, i8*, i64) #1 | |
; Function Attrs: norecurse uwtable | |
define i32 @main() #2 { | |
%ok_day = alloca %class.HowGoodIsToday, align 8 | |
%better_day = alloca %class.HowGoodIsToday, align 8 | |
call void @_ZN14HowGoodIsTodayC1Ev(%class.HowGoodIsToday* %ok_day) | |
call void @_ZN14HowGoodIsTodayC1Ev(%class.HowGoodIsToday* %better_day) | |
call void @_ZN14HowGoodIsToday9set_valueEi(%class.HowGoodIsToday* %ok_day, i32 6) | |
call void @_ZN14HowGoodIsToday9set_valueEi(%class.HowGoodIsToday* %better_day, i32 20) | |
call void @_ZN14HowGoodIsToday10set_phraseEPKc(%class.HowGoodIsToday* %better_day, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i32 0, i32 0)) | |
call void @_Z13show_best_dayP14HowGoodIsTodayS0_(%class.HowGoodIsToday* %ok_day, %class.HowGoodIsToday* %better_day) | |
ret i32 0 | |
} | |
; Function Attrs: nounwind uwtable | |
define linkonce_odr void @_ZN14HowGoodIsTodayC1Ev(%class.HowGoodIsToday* %this) unnamed_addr #3 comdat align 2 { | |
%1 = alloca %class.HowGoodIsToday*, align 8 | |
store %class.HowGoodIsToday* %this, %class.HowGoodIsToday** %1, align 8 | |
%2 = load %class.HowGoodIsToday*, %class.HowGoodIsToday** %1, align 8 | |
%3 = bitcast %class.HowGoodIsToday* %2 to %class.Display* | |
call void @_ZN7DisplayC2Ev(%class.Display* %3) #6 | |
%4 = bitcast %class.HowGoodIsToday* %2 to i8* | |
%5 = getelementptr inbounds i8, i8* %4, i64 24 | |
%6 = bitcast i8* %5 to %class.PartialEq* | |
call void @_ZN9PartialEqC2Ev(%class.PartialEq* %6) #6 | |
%7 = bitcast %class.HowGoodIsToday* %2 to %class.PhraseOfTheDay* | |
call void @_ZN14PhraseOfTheDayC2Ev(%class.PhraseOfTheDay* %7, i8** getelementptr inbounds ([13 x i8*], [13 x i8*]* @_ZTT14HowGoodIsToday, i64 0, i64 6)) #6 | |
%8 = bitcast %class.HowGoodIsToday* %2 to i8* | |
%9 = getelementptr inbounds i8, i8* %8, i64 32 | |
%10 = bitcast i8* %9 to %class.PartialOrd* | |
call void @_ZN10PartialOrdC2Ev(%class.PartialOrd* %10) #6 | |
%11 = bitcast %class.HowGoodIsToday* %2 to i8* | |
%12 = getelementptr inbounds i8, i8* %11, i64 24 | |
%13 = bitcast i8* %12 to %class.IntStorage* | |
call void @_ZN10IntStorageC2Ev(%class.IntStorage* %13, i8** getelementptr inbounds ([13 x i8*], [13 x i8*]* @_ZTT14HowGoodIsToday, i64 0, i64 9)) #6 | |
%14 = bitcast %class.HowGoodIsToday* %2 to i32 (...)*** | |
store i32 (...)** bitcast (i8** getelementptr inbounds ([30 x i8*], [30 x i8*]* @_ZTV14HowGoodIsToday, i64 0, i64 9) to i32 (...)**), i32 (...)*** %14, align 8 | |
%15 = bitcast %class.HowGoodIsToday* %2 to i32 (...)*** | |
store i32 (...)** bitcast (i8** getelementptr inbounds ([30 x i8*], [30 x i8*]* @_ZTV14HowGoodIsToday, i64 0, i64 9) to i32 (...)**), i32 (...)*** %15, align 8 | |
%16 = bitcast %class.HowGoodIsToday* %2 to i32 (...)*** | |
store i32 (...)** bitcast (i8** getelementptr inbounds ([30 x i8*], [30 x i8*]* @_ZTV14HowGoodIsToday, i64 0, i64 9) to i32 (...)**), i32 (...)*** %16, align 8 | |
%17 = bitcast %class.HowGoodIsToday* %2 to i8* | |
%18 = getelementptr inbounds i8, i8* %17, i64 24 | |
%19 = bitcast i8* %18 to i32 (...)*** | |
store i32 (...)** bitcast (i8** getelementptr inbounds ([30 x i8*], [30 x i8*]* @_ZTV14HowGoodIsToday, i64 0, i64 23) to i32 (...)**), i32 (...)*** %19, align 8 | |
%20 = bitcast %class.HowGoodIsToday* %2 to i8* | |
%21 = getelementptr inbounds i8, i8* %20, i64 24 | |
%22 = bitcast i8* %21 to i32 (...)*** | |
store i32 (...)** bitcast (i8** getelementptr inbounds ([30 x i8*], [30 x i8*]* @_ZTV14HowGoodIsToday, i64 0, i64 23) to i32 (...)**), i32 (...)*** %22, align 8 | |
%23 = bitcast %class.HowGoodIsToday* %2 to i8* | |
%24 = getelementptr inbounds i8, i8* %23, i64 32 | |
%25 = bitcast i8* %24 to i32 (...)*** | |
store i32 (...)** bitcast (i8** getelementptr inbounds ([30 x i8*], [30 x i8*]* @_ZTV14HowGoodIsToday, i64 0, i64 29) to i32 (...)**), i32 (...)*** %25, align 8 | |
%26 = getelementptr inbounds %class.HowGoodIsToday, %class.HowGoodIsToday* %2, i32 0, i32 1 | |
store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i32 0, i32 0), i8** %26, align 8 | |
%27 = getelementptr inbounds %class.HowGoodIsToday, %class.HowGoodIsToday* %2, i32 0, i32 2 | |
store i32 0, i32* %27, align 8 | |
ret void | |
} | |
; Function Attrs: nounwind uwtable | |
define linkonce_odr void @_ZN14HowGoodIsToday9set_valueEi(%class.HowGoodIsToday* %this, i32 %value) unnamed_addr #3 comdat align 2 { | |
%1 = alloca %class.HowGoodIsToday*, align 8 | |
%2 = alloca i32, align 4 | |
store %class.HowGoodIsToday* %this, %class.HowGoodIsToday** %1, align 8 | |
store i32 %value, i32* %2, align 4 | |
%3 = load %class.HowGoodIsToday*, %class.HowGoodIsToday** %1, align 8 | |
%4 = load i32, i32* %2, align 4 | |
%5 = getelementptr inbounds %class.HowGoodIsToday, %class.HowGoodIsToday* %3, i32 0, i32 2 | |
store i32 %4, i32* %5, align 8 | |
ret void | |
} | |
; Function Attrs: nounwind uwtable | |
define linkonce_odr void @_ZN14HowGoodIsToday10set_phraseEPKc(%class.HowGoodIsToday* %this, i8* %phrase) unnamed_addr #3 comdat align 2 { | |
%1 = alloca %class.HowGoodIsToday*, align 8 | |
%2 = alloca i8*, align 8 | |
store %class.HowGoodIsToday* %this, %class.HowGoodIsToday** %1, align 8 | |
store i8* %phrase, i8** %2, align 8 | |
%3 = load %class.HowGoodIsToday*, %class.HowGoodIsToday** %1, align 8 | |
%4 = load i8*, i8** %2, align 8 | |
%5 = getelementptr inbounds %class.HowGoodIsToday, %class.HowGoodIsToday* %3, i32 0, i32 1 | |
store i8* %4, i8** %5, align 8 | |
ret void | |
} | |
; Function Attrs: inlinehint nounwind uwtable | |
define linkonce_odr void @_ZN7DisplayC2Ev(%class.Display* %this) unnamed_addr #4 comdat align 2 { | |
%1 = alloca %class.Display*, align 8 | |
store %class.Display* %this, %class.Display** %1, align 8 | |
%2 = load %class.Display*, %class.Display** %1, align 8 | |
%3 = bitcast %class.Display* %2 to i32 (...)*** | |
store i32 (...)** bitcast (i8** getelementptr inbounds ([3 x i8*], [3 x i8*]* @_ZTV7Display, i64 0, i64 2) to i32 (...)**), i32 (...)*** %3, align 8 | |
ret void | |
} | |
; Function Attrs: inlinehint nounwind uwtable | |
define linkonce_odr void @_ZN9PartialEqC2Ev(%class.PartialEq* %this) unnamed_addr #4 comdat align 2 { | |
%1 = alloca %class.PartialEq*, align 8 | |
store %class.PartialEq* %this, %class.PartialEq** %1, align 8 | |
%2 = load %class.PartialEq*, %class.PartialEq** %1, align 8 | |
%3 = bitcast %class.PartialEq* %2 to i32 (...)*** | |
store i32 (...)** bitcast (i8** getelementptr inbounds ([3 x i8*], [3 x i8*]* @_ZTV9PartialEq, i64 0, i64 2) to i32 (...)**), i32 (...)*** %3, align 8 | |
ret void | |
} | |
; Function Attrs: inlinehint nounwind uwtable | |
define linkonce_odr void @_ZN14PhraseOfTheDayC2Ev(%class.PhraseOfTheDay* %this, i8** %vtt) unnamed_addr #4 comdat align 2 { | |
%1 = alloca %class.PhraseOfTheDay*, align 8 | |
%2 = alloca i8**, align 8 | |
store %class.PhraseOfTheDay* %this, %class.PhraseOfTheDay** %1, align 8 | |
store i8** %vtt, i8*** %2, align 8 | |
%3 = load %class.PhraseOfTheDay*, %class.PhraseOfTheDay** %1, align 8 | |
%4 = load i8**, i8*** %2, align 8 | |
%5 = load i8*, i8** %4, align 8 | |
%6 = bitcast %class.PhraseOfTheDay* %3 to i32 (...)*** | |
%7 = bitcast i8* %5 to i32 (...)** | |
store i32 (...)** %7, i32 (...)*** %6, align 8 | |
%8 = getelementptr inbounds i8*, i8** %4, i64 1 | |
%9 = load i8*, i8** %8, align 8 | |
%10 = bitcast %class.PhraseOfTheDay* %3 to i8** | |
%11 = load i8*, i8** %10, align 8 | |
%12 = getelementptr i8, i8* %11, i64 -32 | |
%13 = bitcast i8* %12 to i64* | |
%14 = load i64, i64* %13, align 8 | |
%15 = bitcast %class.PhraseOfTheDay* %3 to i8* | |
%16 = getelementptr inbounds i8, i8* %15, i64 %14 | |
%17 = bitcast i8* %16 to i32 (...)*** | |
%18 = bitcast i8* %9 to i32 (...)** | |
store i32 (...)** %18, i32 (...)*** %17, align 8 | |
%19 = getelementptr inbounds i8*, i8** %4, i64 2 | |
%20 = load i8*, i8** %19, align 8 | |
%21 = bitcast %class.PhraseOfTheDay* %3 to i8** | |
%22 = load i8*, i8** %21, align 8 | |
%23 = getelementptr i8, i8* %22, i64 -40 | |
%24 = bitcast i8* %23 to i64* | |
%25 = load i64, i64* %24, align 8 | |
%26 = bitcast %class.PhraseOfTheDay* %3 to i8* | |
%27 = getelementptr inbounds i8, i8* %26, i64 %25 | |
%28 = bitcast i8* %27 to i32 (...)*** | |
%29 = bitcast i8* %20 to i32 (...)** | |
store i32 (...)** %29, i32 (...)*** %28, align 8 | |
ret void | |
} | |
; Function Attrs: inlinehint nounwind uwtable | |
define linkonce_odr void @_ZN10PartialOrdC2Ev(%class.PartialOrd* %this) unnamed_addr #4 comdat align 2 { | |
%1 = alloca %class.PartialOrd*, align 8 | |
store %class.PartialOrd* %this, %class.PartialOrd** %1, align 8 | |
%2 = load %class.PartialOrd*, %class.PartialOrd** %1, align 8 | |
%3 = bitcast %class.PartialOrd* %2 to i32 (...)*** | |
store i32 (...)** bitcast (i8** getelementptr inbounds ([3 x i8*], [3 x i8*]* @_ZTV10PartialOrd, i64 0, i64 2) to i32 (...)**), i32 (...)*** %3, align 8 | |
ret void | |
} | |
; Function Attrs: inlinehint nounwind uwtable | |
define linkonce_odr void @_ZN10IntStorageC2Ev(%class.IntStorage* %this, i8** %vtt) unnamed_addr #4 comdat align 2 { | |
%1 = alloca %class.IntStorage*, align 8 | |
%2 = alloca i8**, align 8 | |
store %class.IntStorage* %this, %class.IntStorage** %1, align 8 | |
store i8** %vtt, i8*** %2, align 8 | |
%3 = load %class.IntStorage*, %class.IntStorage** %1, align 8 | |
%4 = load i8**, i8*** %2, align 8 | |
%5 = load i8*, i8** %4, align 8 | |
%6 = bitcast %class.IntStorage* %3 to i32 (...)*** | |
%7 = bitcast i8* %5 to i32 (...)** | |
store i32 (...)** %7, i32 (...)*** %6, align 8 | |
%8 = getelementptr inbounds i8*, i8** %4, i64 1 | |
%9 = load i8*, i8** %8, align 8 | |
%10 = bitcast %class.IntStorage* %3 to i8** | |
%11 = load i8*, i8** %10, align 8 | |
%12 = getelementptr i8, i8* %11, i64 -32 | |
%13 = bitcast i8* %12 to i64* | |
%14 = load i64, i64* %13, align 8 | |
%15 = bitcast %class.IntStorage* %3 to i8* | |
%16 = getelementptr inbounds i8, i8* %15, i64 %14 | |
%17 = bitcast i8* %16 to i32 (...)*** | |
%18 = bitcast i8* %9 to i32 (...)** | |
store i32 (...)** %18, i32 (...)*** %17, align 8 | |
%19 = getelementptr inbounds i8*, i8** %4, i64 2 | |
%20 = load i8*, i8** %19, align 8 | |
%21 = bitcast %class.IntStorage* %3 to i8** | |
%22 = load i8*, i8** %21, align 8 | |
%23 = getelementptr i8, i8* %22, i64 -40 | |
%24 = bitcast i8* %23 to i64* | |
%25 = load i64, i64* %24, align 8 | |
%26 = bitcast %class.IntStorage* %3 to i8* | |
%27 = getelementptr inbounds i8, i8* %26, i64 %25 | |
%28 = bitcast i8* %27 to i32 (...)*** | |
%29 = bitcast i8* %20 to i32 (...)** | |
store i32 (...)** %29, i32 (...)*** %28, align 8 | |
%30 = getelementptr inbounds i8*, i8** %4, i64 3 | |
%31 = load i8*, i8** %30, align 8 | |
%32 = bitcast %class.IntStorage* %3 to i8** | |
%33 = load i8*, i8** %32, align 8 | |
%34 = getelementptr i8, i8* %33, i64 -48 | |
%35 = bitcast i8* %34 to i64* | |
%36 = load i64, i64* %35, align 8 | |
%37 = bitcast %class.IntStorage* %3 to i8* | |
%38 = getelementptr inbounds i8, i8* %37, i64 %36 | |
%39 = bitcast i8* %38 to i32 (...)*** | |
%40 = bitcast i8* %31 to i32 (...)** | |
store i32 (...)** %40, i32 (...)*** %39, align 8 | |
ret void | |
} | |
declare void @__cxa_pure_virtual() | |
; Function Attrs: uwtable | |
define linkonce_odr void @_ZNK14HowGoodIsToday7displayEv(%class.HowGoodIsToday* %this) unnamed_addr #0 comdat align 2 { | |
%1 = alloca %class.HowGoodIsToday*, align 8 | |
store %class.HowGoodIsToday* %this, %class.HowGoodIsToday** %1, align 8 | |
%2 = load %class.HowGoodIsToday*, %class.HowGoodIsToday** %1, align 8 | |
%3 = getelementptr inbounds %class.HowGoodIsToday, %class.HowGoodIsToday* %2, i32 0, i32 1 | |
%4 = load i8*, i8** %3, align 8 | |
%5 = getelementptr inbounds %class.HowGoodIsToday, %class.HowGoodIsToday* %2, i32 0, i32 2 | |
%6 = load i32, i32* %5, align 8 | |
%7 = call i32 (i8*, ...) @printf(i8* %4, i32 %6) | |
ret void | |
} | |
; Function Attrs: nounwind uwtable | |
define linkonce_odr zeroext i1 @_ZNK14HowGoodIsToday2eqEP9PartialEq(%class.HowGoodIsToday* %this, %class.PartialEq* %_other) unnamed_addr #3 comdat align 2 { | |
%1 = alloca %class.HowGoodIsToday*, align 8 | |
%2 = alloca %class.PartialEq*, align 8 | |
%other = alloca %class.HowGoodIsToday*, align 8 | |
store %class.HowGoodIsToday* %this, %class.HowGoodIsToday** %1, align 8 | |
store %class.PartialEq* %_other, %class.PartialEq** %2, align 8 | |
%3 = load %class.HowGoodIsToday*, %class.HowGoodIsToday** %1, align 8 | |
%4 = load %class.PartialEq*, %class.PartialEq** %2, align 8 | |
%5 = icmp eq %class.PartialEq* %4, null | |
br i1 %5, label %10, label %6 | |
; <label>:6 ; preds = %0 | |
%7 = bitcast %class.PartialEq* %4 to i8* | |
%8 = call i8* @__dynamic_cast(i8* %7, i8* bitcast ({ i8*, i8* }* @_ZTI9PartialEq to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64 }* @_ZTI14HowGoodIsToday to i8*), i64 -1) #6 | |
%9 = bitcast i8* %8 to %class.HowGoodIsToday* | |
br label %11 | |
; <label>:10 ; preds = %0 | |
br label %11 | |
; <label>:11 ; preds = %10, %6 | |
%12 = phi %class.HowGoodIsToday* [ %9, %6 ], [ null, %10 ] | |
store %class.HowGoodIsToday* %12, %class.HowGoodIsToday** %other, align 8 | |
%13 = getelementptr inbounds %class.HowGoodIsToday, %class.HowGoodIsToday* %3, i32 0, i32 2 | |
%14 = load i32, i32* %13, align 8 | |
%15 = load %class.HowGoodIsToday*, %class.HowGoodIsToday** %other, align 8 | |
%16 = getelementptr inbounds %class.HowGoodIsToday, %class.HowGoodIsToday* %15, i32 0, i32 2 | |
%17 = load i32, i32* %16, align 8 | |
%18 = icmp eq i32 %14, %17 | |
br i1 %18, label %19, label %26 | |
; <label>:19 ; preds = %11 | |
%20 = getelementptr inbounds %class.HowGoodIsToday, %class.HowGoodIsToday* %3, i32 0, i32 1 | |
%21 = load i8*, i8** %20, align 8 | |
%22 = load %class.HowGoodIsToday*, %class.HowGoodIsToday** %other, align 8 | |
%23 = getelementptr inbounds %class.HowGoodIsToday, %class.HowGoodIsToday* %22, i32 0, i32 1 | |
%24 = load i8*, i8** %23, align 8 | |
%25 = icmp eq i8* %21, %24 | |
br label %26 | |
; <label>:26 ; preds = %19, %11 | |
%27 = phi i1 [ false, %11 ], [ %25, %19 ] | |
ret i1 %27 | |
} | |
; Function Attrs: nounwind uwtable | |
define linkonce_odr i32 @_ZNK14HowGoodIsToday11partial_cmpEP10PartialOrd(%class.HowGoodIsToday* %this, %class.PartialOrd* %_other) unnamed_addr #3 comdat align 2 { | |
%1 = alloca i32, align 4 | |
%2 = alloca %class.HowGoodIsToday*, align 8 | |
%3 = alloca %class.PartialOrd*, align 8 | |
%other = alloca %class.HowGoodIsToday*, align 8 | |
store %class.HowGoodIsToday* %this, %class.HowGoodIsToday** %2, align 8 | |
store %class.PartialOrd* %_other, %class.PartialOrd** %3, align 8 | |
%4 = load %class.HowGoodIsToday*, %class.HowGoodIsToday** %2, align 8 | |
%5 = load %class.PartialOrd*, %class.PartialOrd** %3, align 8 | |
%6 = icmp eq %class.PartialOrd* %5, null | |
br i1 %6, label %11, label %7 | |
; <label>:7 ; preds = %0 | |
%8 = bitcast %class.PartialOrd* %5 to i8* | |
%9 = call i8* @__dynamic_cast(i8* %8, i8* bitcast ({ i8*, i8* }* @_ZTI10PartialOrd to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64 }* @_ZTI14HowGoodIsToday to i8*), i64 -1) #6 | |
%10 = bitcast i8* %9 to %class.HowGoodIsToday* | |
br label %12 | |
; <label>:11 ; preds = %0 | |
br label %12 | |
; <label>:12 ; preds = %11, %7 | |
%13 = phi %class.HowGoodIsToday* [ %10, %7 ], [ null, %11 ] | |
store %class.HowGoodIsToday* %13, %class.HowGoodIsToday** %other, align 8 | |
%14 = getelementptr inbounds %class.HowGoodIsToday, %class.HowGoodIsToday* %4, i32 0, i32 2 | |
%15 = load i32, i32* %14, align 8 | |
%16 = load %class.HowGoodIsToday*, %class.HowGoodIsToday** %other, align 8 | |
%17 = getelementptr inbounds %class.HowGoodIsToday, %class.HowGoodIsToday* %16, i32 0, i32 2 | |
%18 = load i32, i32* %17, align 8 | |
%19 = icmp sgt i32 %15, %18 | |
br i1 %19, label %20, label %21 | |
; <label>:20 ; preds = %12 | |
store i32 1, i32* %1, align 4 | |
br label %31 | |
; <label>:21 ; preds = %12 | |
%22 = getelementptr inbounds %class.HowGoodIsToday, %class.HowGoodIsToday* %4, i32 0, i32 2 | |
%23 = load i32, i32* %22, align 8 | |
%24 = load %class.HowGoodIsToday*, %class.HowGoodIsToday** %other, align 8 | |
%25 = getelementptr inbounds %class.HowGoodIsToday, %class.HowGoodIsToday* %24, i32 0, i32 2 | |
%26 = load i32, i32* %25, align 8 | |
%27 = icmp slt i32 %23, %26 | |
br i1 %27, label %28, label %29 | |
; <label>:28 ; preds = %21 | |
store i32 -1, i32* %1, align 4 | |
br label %31 | |
; <label>:29 ; preds = %21 | |
br label %30 | |
; <label>:30 ; preds = %29 | |
store i32 0, i32* %1, align 4 | |
br label %31 | |
; <label>:31 ; preds = %30, %28, %20 | |
%32 = load i32, i32* %1, align 4 | |
ret i32 %32 | |
} | |
; Function Attrs: nounwind uwtable | |
define linkonce_odr i32 @_ZNK14HowGoodIsToday9get_valueEv(%class.HowGoodIsToday* %this) unnamed_addr #3 comdat align 2 { | |
%1 = alloca %class.HowGoodIsToday*, align 8 | |
store %class.HowGoodIsToday* %this, %class.HowGoodIsToday** %1, align 8 | |
%2 = load %class.HowGoodIsToday*, %class.HowGoodIsToday** %1, align 8 | |
%3 = getelementptr inbounds %class.HowGoodIsToday, %class.HowGoodIsToday* %2, i32 0, i32 2 | |
%4 = load i32, i32* %3, align 8 | |
ret i32 %4 | |
} | |
; Function Attrs: uwtable | |
define linkonce_odr zeroext i1 @_ZTv0_n24_NK14HowGoodIsToday2eqEP9PartialEq(%class.HowGoodIsToday* %this, %class.PartialEq* %_other) unnamed_addr #0 comdat align 2 { | |
%1 = alloca %class.HowGoodIsToday*, align 8 | |
%2 = alloca %class.PartialEq*, align 8 | |
store %class.HowGoodIsToday* %this, %class.HowGoodIsToday** %1, align 8 | |
store %class.PartialEq* %_other, %class.PartialEq** %2, align 8 | |
%3 = load %class.HowGoodIsToday*, %class.HowGoodIsToday** %1, align 8 | |
%4 = bitcast %class.HowGoodIsToday* %3 to i8* | |
%5 = bitcast i8* %4 to i8** | |
%6 = load i8*, i8** %5, align 8 | |
%7 = getelementptr inbounds i8, i8* %6, i64 -24 | |
%8 = bitcast i8* %7 to i64* | |
%9 = load i64, i64* %8, align 8 | |
%10 = getelementptr inbounds i8, i8* %4, i64 %9 | |
%11 = bitcast i8* %10 to %class.HowGoodIsToday* | |
%12 = load %class.PartialEq*, %class.PartialEq** %2, align 8 | |
%13 = tail call zeroext i1 @_ZNK14HowGoodIsToday2eqEP9PartialEq(%class.HowGoodIsToday* %11, %class.PartialEq* %12) | |
ret i1 %13 | |
} | |
; Function Attrs: uwtable | |
define linkonce_odr void @_ZTv0_n56_N14HowGoodIsToday9set_valueEi(%class.HowGoodIsToday* %this, i32 %value) unnamed_addr #0 comdat align 2 { | |
%1 = alloca %class.HowGoodIsToday*, align 8 | |
%2 = alloca i32, align 4 | |
store %class.HowGoodIsToday* %this, %class.HowGoodIsToday** %1, align 8 | |
store i32 %value, i32* %2, align 4 | |
%3 = load %class.HowGoodIsToday*, %class.HowGoodIsToday** %1, align 8 | |
%4 = bitcast %class.HowGoodIsToday* %3 to i8* | |
%5 = bitcast i8* %4 to i8** | |
%6 = load i8*, i8** %5, align 8 | |
%7 = getelementptr inbounds i8, i8* %6, i64 -56 | |
%8 = bitcast i8* %7 to i64* | |
%9 = load i64, i64* %8, align 8 | |
%10 = getelementptr inbounds i8, i8* %4, i64 %9 | |
%11 = bitcast i8* %10 to %class.HowGoodIsToday* | |
%12 = load i32, i32* %2, align 4 | |
tail call void @_ZN14HowGoodIsToday9set_valueEi(%class.HowGoodIsToday* %11, i32 %12) | |
ret void | |
} | |
; Function Attrs: uwtable | |
define linkonce_odr i32 @_ZTv0_n64_NK14HowGoodIsToday9get_valueEv(%class.HowGoodIsToday* %this) unnamed_addr #0 comdat align 2 { | |
%1 = alloca %class.HowGoodIsToday*, align 8 | |
store %class.HowGoodIsToday* %this, %class.HowGoodIsToday** %1, align 8 | |
%2 = load %class.HowGoodIsToday*, %class.HowGoodIsToday** %1, align 8 | |
%3 = bitcast %class.HowGoodIsToday* %2 to i8* | |
%4 = bitcast i8* %3 to i8** | |
%5 = load i8*, i8** %4, align 8 | |
%6 = getelementptr inbounds i8, i8* %5, i64 -64 | |
%7 = bitcast i8* %6 to i64* | |
%8 = load i64, i64* %7, align 8 | |
%9 = getelementptr inbounds i8, i8* %3, i64 %8 | |
%10 = bitcast i8* %9 to %class.HowGoodIsToday* | |
%11 = tail call i32 @_ZNK14HowGoodIsToday9get_valueEv(%class.HowGoodIsToday* %10) | |
ret i32 %11 | |
} | |
; Function Attrs: uwtable | |
define linkonce_odr i32 @_ZTv0_n24_NK14HowGoodIsToday11partial_cmpEP10PartialOrd(%class.HowGoodIsToday* %this, %class.PartialOrd* %_other) unnamed_addr #0 comdat align 2 { | |
%1 = alloca %class.HowGoodIsToday*, align 8 | |
%2 = alloca %class.PartialOrd*, align 8 | |
store %class.HowGoodIsToday* %this, %class.HowGoodIsToday** %1, align 8 | |
store %class.PartialOrd* %_other, %class.PartialOrd** %2, align 8 | |
%3 = load %class.HowGoodIsToday*, %class.HowGoodIsToday** %1, align 8 | |
%4 = bitcast %class.HowGoodIsToday* %3 to i8* | |
%5 = bitcast i8* %4 to i8** | |
%6 = load i8*, i8** %5, align 8 | |
%7 = getelementptr inbounds i8, i8* %6, i64 -24 | |
%8 = bitcast i8* %7 to i64* | |
%9 = load i64, i64* %8, align 8 | |
%10 = getelementptr inbounds i8, i8* %4, i64 %9 | |
%11 = bitcast i8* %10 to %class.HowGoodIsToday* | |
%12 = load %class.PartialOrd*, %class.PartialOrd** %2, align 8 | |
%13 = tail call i32 @_ZNK14HowGoodIsToday11partial_cmpEP10PartialOrd(%class.HowGoodIsToday* %11, %class.PartialOrd* %12) | |
ret i32 %13 | |
} | |
declare i32 @printf(i8*, ...) #5 | |
; Function Attrs: uwtable | |
define linkonce_odr void @_ZTv0_n24_NK14HowGoodIsToday7displayEv(%class.HowGoodIsToday* %this) unnamed_addr #0 comdat align 2 { | |
%1 = alloca %class.HowGoodIsToday*, align 8 | |
store %class.HowGoodIsToday* %this, %class.HowGoodIsToday** %1, align 8 | |
%2 = load %class.HowGoodIsToday*, %class.HowGoodIsToday** %1, align 8 | |
%3 = bitcast %class.HowGoodIsToday* %2 to i8* | |
%4 = bitcast i8* %3 to i8** | |
%5 = load i8*, i8** %4, align 8 | |
%6 = getelementptr inbounds i8, i8* %5, i64 -24 | |
%7 = bitcast i8* %6 to i64* | |
%8 = load i64, i64* %7, align 8 | |
%9 = getelementptr inbounds i8, i8* %3, i64 %8 | |
%10 = bitcast i8* %9 to %class.HowGoodIsToday* | |
tail call void @_ZNK14HowGoodIsToday7displayEv(%class.HowGoodIsToday* %10) | |
ret void | |
} | |
; Function Attrs: uwtable | |
define linkonce_odr void @_ZTv0_n48_N14HowGoodIsToday10set_phraseEPKc(%class.HowGoodIsToday* %this, i8* %phrase) unnamed_addr #0 comdat align 2 { | |
%1 = alloca %class.HowGoodIsToday*, align 8 | |
%2 = alloca i8*, align 8 | |
store %class.HowGoodIsToday* %this, %class.HowGoodIsToday** %1, align 8 | |
store i8* %phrase, i8** %2, align 8 | |
%3 = load %class.HowGoodIsToday*, %class.HowGoodIsToday** %1, align 8 | |
%4 = bitcast %class.HowGoodIsToday* %3 to i8* | |
%5 = bitcast i8* %4 to i8** | |
%6 = load i8*, i8** %5, align 8 | |
%7 = getelementptr inbounds i8, i8* %6, i64 -48 | |
%8 = bitcast i8* %7 to i64* | |
%9 = load i64, i64* %8, align 8 | |
%10 = getelementptr inbounds i8, i8* %4, i64 %9 | |
%11 = bitcast i8* %10 to %class.HowGoodIsToday* | |
%12 = load i8*, i8** %2, align 8 | |
tail call void @_ZN14HowGoodIsToday10set_phraseEPKc(%class.HowGoodIsToday* %11, i8* %12) | |
ret void | |
} | |
attributes #0 = { uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" } | |
attributes #1 = { nounwind readonly } | |
attributes #2 = { norecurse uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" } | |
attributes #3 = { nounwind uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" } | |
attributes #4 = { inlinehint nounwind uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" } | |
attributes #5 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" } | |
attributes #6 = { nounwind } | |
!llvm.ident = !{!0} | |
!0 = !{!"clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment