brintos

brintos / llvm-project-archived public Read only

0
0
Text · 989 B · 70c84eb Raw
24 lines · cpp
1// 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 bucket7// number than any other function in the PDB.  When changing this test, ensure8// that this requirement still holds.  This is because we need to test lookup9// in the edge case where we try to look something up in the final bucket, which10// 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}24