libclang in c99-to-c89: crash detected during parsing

There is a small app that translated c99 src code to c89 (mainly to be able to compile some projects written in c99 with MS compiler).

I've built clang (with vs2008) and used that project multiple times, however, with latest builds of clang it does not work anymore.
Some files suddenly now produce error like this one:

libclang: crash detected during parsing: {
  'source_filename' : 'check_closesocket.i'
  'command_line_args' : [],
  'unsaved_files' : [],
  'options' : 1,

The source code of the c99conv is here:
If I replace libclang.dll with the one from 21st October 2012 svn of clang/llvm then everything works fine.

here's the test file check_closesocket.c:

#include <winsock2.h>
long check_closesocket(void) { return (long) closesocket; }
int main(void) { return 0; }

First, I generate preprocessed file (from vs2008 or 2010 command prompt):
cl -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Dstrtod=avpriv_strtod -Dsnprintf=avpriv_snprintf -D_snprintf=avpriv_snprintf -Dvsnprintf=avpriv_vsnprintf -nologo -D_USE_MATH_DEFINES -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64 -Oy -P check_closesocket.c

output is saved to check_closesocket.i

Then, if I run this command:
c99conv šcheck_closesocket.i check_closesocket.o_converted.c
c99conv š-ms check_closesocket.i check_closesocket.o_converted.c

I get the libclang: crash detected during parsing

any idea where parser became unable to parse ms headers?

I don't think there is anything wrong with the tool itself. I'm pretty sure, it's a problem of the libclang, or problem of ms headers that cause it to crash.
The problem happens on the first step before anything was ever done:

    index = clang_createIndex(1, 1);
    TU = clang_createTranslationUnitFromSourceFile(index, infile, argc, argv, 0, NULL);

clang_createTranslationUnitFromSourceFile generates that "libclang: crash detected during parsing".

If I use LLVM 3.2 release instead of current SVN, then everything works fine.

I tried to debug the crash and it crashes while parsing ms-style inline asm. Here's the backtrace of the crash:

here's the piece of code that crashes it (inside clang\lib\Sema\SemaStmtAsm.cpp):

  const llvm::Target *TheTarget(llvm::TargetRegistry::lookupTarget(TT, Error));

  OwningPtr<llvm::MCAsmInfo> MAI(TheTarget->createMCAsmInfo(TT));

crash because TheTarget is NULL.
Also, EE is set to this string at this point: "Unable to find target for this triple (no targets are registered)"