PR binutils/12467
[binutils.git] / gold / testsuite / odr_violation2.cc
blob09940d4fb434211b70cdfdfc94167a0727b83a07
1 #include <algorithm>
3 class Ordering {
4 public:
5 bool operator()(int a, int b) {
6 // We need the "+ 1" here to force this operator() to be a
7 // different size than the one in odr_violation1.cc.
8 return a + 1 > b + 1;
12 void SortDescending(int array[], int size) {
13 std::sort(array, array + size, Ordering());
16 // This is weak in odr_violation1.cc.
17 extern "C" int OverriddenCFunction(int i) {
18 return i * i;
20 // This is inline in debug_msg.cc, which makes it a weak symbol too.
21 int SometimesInlineFunction(int i) {
22 return i * i;