This is an archive of the discontinued LLVM Phabricator instance.

[ASan] [Windows] Avoid including windows.h in asan_malloc_win.cc
ClosedPublic

Authored by mstorsjo on Sep 11 2018, 12:28 AM.

Details

Summary

Instead provide manual declarations of the used types, to avoid pulling in conflicting declarations of some of the functions that are to be overridden.

This is an alternative to D51879.

Diff Detail

Repository
rL LLVM

Event Timeline

mstorsjo created this revision.Sep 11 2018, 12:28 AM
Herald added subscribers: Restricted Project, kubamracek. · View Herald TranscriptSep 11 2018, 12:28 AM
rnk accepted this revision.Sep 11 2018, 1:14 PM

lgtm

lib/asan/asan_malloc_win.cc
17 ↗(On Diff #164815)

We can drop this define, it's just intended to reduce windows.h transitive includes.

27–28 ↗(On Diff #164815)

Hm, these two constants are not as obvious as the typedefs. Oh well.

This revision is now accepted and ready to land.Sep 11 2018, 1:14 PM
mstorsjo added inline comments.Sep 11 2018, 1:19 PM
lib/asan/asan_malloc_win.cc
17 ↗(On Diff #164815)

Doh, yes, will do.

This revision was automatically updated to reflect the committed changes.