1// RUN: %clang_cl -MD -c -o %t %s
2// RUN: %llvm_jitlink %t
3
4extern "C" __declspec(dllimport) void llvm_jitlink_setTestResultOverride(
5 long Value);
6
7extern "C" int init() { return -1; }
8extern "C" int init2() { return -2; }
9
10extern "C" int a = init();
11extern "C" int b = 2;
12extern "C" int c = init2();
13
14int main(int argc, char *argv[]) {
15 llvm_jitlink_setTestResultOverride(Value: a + b + c + 1);
16 return 0;
17}
18

source code of compiler-rt/test/orc/TestCases/Windows/x86-64/static-initializer.cpp