[llvm] r290263 - Add missing includes on Windows.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 21 11:17:13 PST 2016


I can't really reproduce Andrey's original problem (_byteswap_ushort
compiles for me just fine without this include), but if I change this to
<cstdlib> then I assume I have to change _byteswap_ushort to
std::_byteswap_ushort, and yet that fails.  So I'm not really sure

On Wed, Dec 21, 2016 at 11:06 AM Aaron Ballman <aaron at aaronballman.com>
wrote:

> On Wed, Dec 21, 2016 at 1:50 PM, Zachary Turner via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > Author: zturner
> > Date: Wed Dec 21 12:50:52 2016
> > New Revision: 290263
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=290263&view=rev
> > Log:
> > Add missing includes on Windows.
> >
> > Patch by Andrey Khalyavin
> > Differential Revision: https://reviews.llvm.org/D27915
> >
> > Modified:
> >     llvm/trunk/include/llvm/Support/SwapByteOrder.h
> >     llvm/trunk/lib/Support/Windows/Signals.inc
> >
> > Modified: llvm/trunk/include/llvm/Support/SwapByteOrder.h
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/SwapByteOrder.h?rev=290263&r1=290262&r2=290263&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/include/llvm/Support/SwapByteOrder.h (original)
> > +++ llvm/trunk/include/llvm/Support/SwapByteOrder.h Wed Dec 21 12:50:52
> 2016
> > @@ -18,6 +18,9 @@
> >  #include "llvm/Support/Compiler.h"
> >  #include "llvm/Support/DataTypes.h"
> >  #include <cstddef>
> > +#if defined(_MSC_VER) && !defined(_DEBUG)
> > +#include <stdlib.h>
>
> <cstdlib> instead of <stdlib.h>?
>
> ~Aaron
>
> > +#endif
> >
> >  namespace llvm {
> >  namespace sys {
> >
> > Modified: llvm/trunk/lib/Support/Windows/Signals.inc
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Signals.inc?rev=290263&r1=290262&r2=290263&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/lib/Support/Windows/Signals.inc (original)
> > +++ llvm/trunk/lib/Support/Windows/Signals.inc Wed Dec 21 12:50:52 2016
> > @@ -28,6 +28,7 @@
> >  #ifdef __MINGW32__
> >   #include <imagehlp.h>
> >  #else
> > + #include <crtdbg.h>
> >   #include <dbghelp.h>
> >  #endif
> >  #include <psapi.h>
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161221/3e895393/attachment-0001.html>


More information about the llvm-commits mailing list