• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // To generate the corresponding EXE, run:
2 // clang-cl -MD -c coff-exports.cpp && lld-link /MANIFEST:NO coff-exports.obj
3 
4 #define EXPORT __declspec(dllexport)
5 
6 extern "C" int puts(const char *str);
7 
foo()8 EXPORT void __declspec(noinline) foo() {
9   puts("foo1");
10   puts("foo2");
11 }
12 
bar()13 void bar() {
14   foo();
15 }
16 
main()17 EXPORT int main() {
18   bar();
19   return 0;
20 }
21