[cfe-dev] Newby questions
Chris Lattner
clattner at apple.com
Sun Sep 9 17:18:53 PDT 2007
On Sep 9, 2007, at 12:56 PM, Anton Korobeynikov wrote:
> Hello, Hartmut
>
>> So what's the general approach to this kind of pp magic? Is there
>> some
>> existing pp constant I could use?
> I don't exactly know, how the things are going in clang. But I'd
> really
> prefer not to use any platform-dependent defines in the "common"
> sources. Maybe some indirection via configuration defines (like
> "CLANG_ON_WINDOWS" - same as "LLVM_ON_UNIX" / "LLVM_ON_WINDOWS" and
> libSystem / libSupport) should be introduced.
clang gets access to all the llvm headers, so you should be able to do:
#include "llvm/Config/config.h"
#ifdef LLVM_ON_WIN32
...
#endif
Does that work?
-Chris
More information about the cfe-dev
mailing list