This is a generalization of _LIBCPP_NEW_DELETE_VIS; the new macro name
captures the semantics better, and also allows us to get rid of the
_WIN32 check in include/new. No functional change.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
What happens on windows when operator new isn't overridden and has to be imported from the DLL? Does that work?
src/new.cpp | ||
---|---|---|
163 ↗ | (On Diff #78079) | You should be able to remove the macro on the definitions since they're redundant. |
Yup. If you have a function that isn't marked dllimport and it's not found locally, the linker will look for it in the libraries being linked to. dllimport just allows the function call to be more efficient (if a function is marked dllimport, the compiler can call the imported function directly, whereas if it isn't, the linker has to emit a fixup thunk and you end up with an extra function call for each call to the imported function). dllimport is necessary for data symbols though, but fortunately we're not dealing with any of those here.
src/new.cpp | ||
---|---|---|
163 ↗ | (On Diff #78079) | Good point. Will do that before committing. |