Files
clang-p2996/lldb/test/API/lang/cpp/multiple-inheritance/main.cpp
Jordan Rupprecht 99451b4453 [lldb][test] Remove symlink for API tests.
Summary: Moves lldbsuite tests to lldb/test/API.

This is a largely mechanical change, moved with the following steps:

```
rm lldb/test/API/testcases
mkdir -p lldb/test/API/{test_runner/test,tools/lldb-{server,vscode}}
mv lldb/packages/Python/lldbsuite/test/test_runner/test lldb/test/API/test_runner
for d in $(find lldb/packages/Python/lldbsuite/test/* -maxdepth 0 -type d | egrep -v "make|plugins|test_runner|tools"); do mv $d lldb/test/API; done
for d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-vscode -maxdepth 1 -mindepth 1 | grep -v ".py"); do mv $d lldb/test/API/tools/lldb-vscode; done
for d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-server -maxdepth 1 -mindepth 1 | egrep -v "gdbremote_testcase.py|lldbgdbserverutils.py|socket_packet_pump.py"); do mv $d lldb/test/API/tools/lldb-server; done
```

lldb/packages/Python/lldbsuite/__init__.py and lldb/test/API/lit.cfg.py were also updated with the new directory structure.

Reviewers: labath, JDevlieghere

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D71151
2020-02-11 10:03:53 -08:00

53 lines
1.1 KiB
C++

struct CommonBase {
int m_base;
int virt_base_val;
int func_base_val;
virtual int virt_base() { return virt_base_val; }
virtual int virt_common() { return 555; }
int func_base() { return func_base_val; }
int func_common() { return 777; }
};
struct Base1 : CommonBase {
int m1 = 22;
Base1() {
// Give the base functions/members unique values.
virt_base_val = 111;
func_base_val = 112;
m_base = 11;
}
virtual int virt1() { return 3; }
int func1() { return 4; }
};
struct Base2 : CommonBase {
int m2 = 33;
Base2() {
// Give the base functions/members unique values.
virt_base_val = 121;
func_base_val = 122;
m_base = 12;
}
virtual int virt2() { return 5; }
int func2() { return 6; }
};
struct FinalClass : Base1, Base2 {
int m_final = 44;
virtual int final_virt() { return 7; }
int final_func() { return 8; }
virtual int virt_common() { return 444; }
int func_common() { return 888; }
};
int main() {
FinalClass C;
// Call functions so they get emitted.
C.func1();
C.func2();
C.final_func();
C.func_common();
C.Base1::func_base();
return 0; // break here
}