[cfe-dev] Newby questions
clattner at apple.com
Fri Aug 31 19:54:35 CDT 2007
On Aug 31, 2007, at 4:07 PM, Hartmut Kaiser <hartmut.kaiser at gmail.com>
> Hi all,
> I'm new to this list and this project, which IMHO is very important
> for the
> whole C++ community. I have a couple of questions - please excuse my
> ignorance if these have been answered before.
> 1. I couldn't find any build instructions/project files to build
> clang using
> MSVC8, so I decided to create these. I tried to use similar build
> as have been used in the corresponding MSVC project files for LLVM.
> everything compiled fine, except for a bigger issue and some really
> platform specific issues, which I have been able to address. The
> issue is that the clang::FileEntry class retrieves the size of the
> using stat, but because of the EOL translation done on Windows the
> usually is smaller in memory than it is on disk. I introduced a hack
> in the
> ReadFileFast() function to circumvent an infinite loop there, but
> this has
> other effects I'm not able to resolve ad hoc. How is this solved in
LLVM has a system abstraction library, but it needs to be properly
extended to handle this case. Can you please send in the patch for
for the change?
> 2. The clang driver builds and runs for me now (after this hack) but
> getting an assertion when I started to run the array.c test in the
> test/CodeGen directory: Assertion failed: isa<X>(Val) && "cast<Ty>()
> argument of incompatible type!", file
> c:\CVS\llvm\include\llvm/Support/Casting.h, line 199. Is this a
> known issue
> or did something go wrong during my compilation, or is this related
> to the
> issue I described above?
I'm away from my computer, so I can't check right now. It is possible
that it is a real regression, but we also haven't done much testing on
windows, so it may be a platform issue.
> 3. After getting these assertions I moved to the test/Lexer
> directory to
> see, if the preprocessor is working. The tests there seem to pass.
> So I
> started to feed the files from the Boost.Wave testsuite to clang in
> pp mode
> (clang -E).
> Unfortunately many of these tests fail (produce wrongly
> preprocessed output). Is this a known issue?
Can you give an example? When producing a .i file, clang futzes with
whitespace a bit to make sure the output will relex into the proper
token stream (this only affects .i file writing, not the parser). You
may be hitting this or it may be a real bug. If it is a bug, we'll
fix it :)
> Would there be any interest in
> using Boost.Wave as the preprocessor/lexer for clang?
I'm not emotionally attached to our current preprocessor - if wave is
as performant and feature compatible with clangs, we can switch.
> 4. Is there any interest in getting the MSVC8 project files
> mentioned above?
> If yes, what's the suggested procedure?
Yes! Please send them to the cfe-commits list.
> Regards Hartmut
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
More information about the cfe-dev