Zachary Turner | 5989281 | 2018-10-09 21:19:03 +0000 | [diff] [blame] | 1 | // Build with "cl.exe /Z7 /GR- /GS- -EHs-c- every-function.cpp /link /debug /nodefaultlib /incremental:no /entry:main" |
| 2 | |
| 3 | void __cdecl operator delete(void *, unsigned int) {} |
| 4 | void __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. |
| 11 | int OvlGlobalFn(int X) { return X + 42; } |
| 12 | int OvlGlobalFn(int X, int Y) { return X + Y + 42; } |
| 13 | int OvlGlobalFn(int X, int Y, int Z) { return X + Y + Z + 42; } |
| 14 | |
| 15 | static int StaticFn(int X) { |
| 16 | return X + 42; |
| 17 | } |
| 18 | |
| 19 | int 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 | } |