[cfe-dev] clang::FileManager -> getFile returns NULL on Windows Visual Studio ### On Linux everything works fine

Peter clang_llvm_123-4 at yahoo.de
Sun Dec 11 03:03:07 PST 2011


Hi everybody,

I just started hacking on a small command line tool and
when I try to get a file with the following code it always gives
me an empty address. 


main.exe c:\test.c 

The same code compiled and running on linux works just fine.

int main (int argc, char **argv)
{
    int ret = 0;

   clang::FileManager *fm = new clang::FileManager(clang::FileSystemOptions());
   const clang::FileEntry* file = fm->getFile(llvm::StringRef(argv[1]));     

    return(ret);
}

Is it a bug? I hope anybody can help me?

Thanks in advance,
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111211/8b5d89f8/attachment.html>


More information about the cfe-dev mailing list