[LLVMdev] DataTypes.h for Visual C
ofv at wanadoo.es
Fri Jun 25 07:28:58 PDT 2010
Jochen Wilhelmy <j.wilhelmy at arcor.de> writes:
>>>> What's that extra code path?
>>> #ifndef _MSC_VER
>>> #else /* _MSC_VER */
>>> /* Visual C++ doesn't provide standard integer headers, but it does provide
>>> built-in data types. */
>>> ... extra code path ...
>> Sorry, that doesn't show an extra code path. DataTypes.h contains stuff
>> specific for MSVC and stuff for the rest of compilers. The
>> #ifndef...#else does just that. Maybe you are reading #ifndef as #ifdef?
> I just wanted to show you what I mean by the extra code path (the
> compiler takes
> one part of code or another dependent on a define), but obviously you
> don't call it code path.
You are talking about an *extra* code path, which to me means something
that we can get rid of because it is unnecessary. I see nothing
unnecessary on DataTypes.h.cmake because, as said before, cmake works
for all build platforms, not only for MSVC.
>> Adding just another config option (and one that is speficic of one
>> compiler) seems overkill to me and would constitute a precedent for
>> similar cases on the future. I try to keep the config option list as
>> short as possible.
>> Protecting the defines, OTOH, is okay.
> Yes, protecting the defines will be enough.
More information about the llvm-dev