blob: 70c84ebed1bc2dc8a930be7e06e50bb62e31df6a [file] [log] [blame]
Zachary Turner59892812018-10-09 21:19:03 +00001// Build with "cl.exe /Z7 /GR- /GS- -EHs-c- every-function.cpp /link /debug /nodefaultlib /incremental:no /entry:main"
2
3void __cdecl operator delete(void *, unsigned int) {}
4void __cdecl operator delete(void *, unsigned __int64) {}
5
6// Note: It's important that this particular function hashes to a higher bucket
7// number than any other function in the PDB. When changing this test, ensure
8// that this requirement still holds. This is because we need to test lookup
9// in the edge case where we try to look something up in the final bucket, which
10// has special logic.
11int OvlGlobalFn(int X) { return X + 42; }
12int OvlGlobalFn(int X, int Y) { return X + Y + 42; }
13int OvlGlobalFn(int X, int Y, int Z) { return X + Y + Z + 42; }
14
15static int StaticFn(int X) {
16 return X + 42;
17}
18
19int main(int argc, char **argv) {
20 // Make sure they don't get optimized out.
21 int Result = OvlGlobalFn(argc) + OvlGlobalFn(argc, argc) + OvlGlobalFn(argc, argc, argc) + StaticFn(argc);
22 return Result;
23}