summaryrefslogtreecommitdiffstats
path: root/test/multiple_tracer_link_test.cpp
blob: 60a9425ac1691679f9f1a1dc2dcc76a6c6805f33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Links in tracer_a.o and tracer_b.o to verify that there's no multiple
// definition error from OpenTracingMakeTracerFactory.
#include <opentracing/dynamic_load.h>

extern "C" {
extern OpenTracingMakeTracerFactoryType* const OpenTracingMakeTracerFactory;
}  // extern "C"

int main() {
  // Call OpenTracingMakeTracerFactory to make sure it's not elided.
  if ((*OpenTracingMakeTracerFactory)(nullptr, nullptr, nullptr, nullptr,
                                      nullptr) != -1) {
    return -1;
  }
  return 0;
}