This is an archive of the discontinued LLVM Phabricator instance.

Fix TestMoveNearest on Windows
ClosedPublic

Authored by amccarth on Feb 21 2018, 4:20 PM.

Details

Summary

The header file for the DLL tried to declare inline functions and a local
function as dllexport which broke the compile and link. Removing the bad
declarations solves the problem, and the test passes on Windows now.

Diff Detail

Repository
rL LLVM

Event Timeline

amccarth created this revision.Feb 21 2018, 4:20 PM

Do we not need call_foo2 anymore?

Do we not need call_foo2 anymore?

call_foo2 is defined in the executable, so attempting to report it as dllexport from the DLL is nonsensical and causes link-time errors.

How is call_foo2 any different than call_foo1, which was not removed from this patch?

call_foo1() is defined in foo.cpp, which is built into a DLL, and thus needs the __declspec(dllimport/dllexport) from the LLDB_TEST_API. foo.h defines the API for the DLL.

call_foo2() is defined in main.cpp, which is built into an executable that depends on foo.dll.

zturner accepted this revision.Feb 22 2018, 2:44 PM

Ok, that's the piece that was missing since the code for foo.cpp and main.cpp weren't part of the patch.

This revision is now accepted and ready to land.Feb 22 2018, 2:44 PM
This revision was automatically updated to reflect the committed changes.