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

Peter clang_llvm_123-4 at yahoo.de
Thu Jun 14 07:56:00 PDT 2012


Hii,

I still can't read files from a root directory on Windows.
I am getting the following error

error: error reading 'C:\test.c'

I've tried with the current llvm trunk and with the 3.1 and 3.0 version.
None of them worked. Any other path works just fine!!

Does anyone now what the problem might by?

Thanks in advance!!!
Peter



Von: NAKAMURA Takumi <geek4civic at gmail.com>
An: Peter <clang_llvm_123-4 at yahoo.de>
Cc: "cfe-dev at cs.uiuc.edu" <cfe-dev at cs.uiuc.edu>
Gesendet: 15:35 Sonntag, 11.Dezember 2011
Betreff: Re: [cfe-dev] clang::FileManager -> getFile returns NULL on Windows Visual Studio ### On Linux everything works fine

2011/12/11 Peter <clang_llvm_123-4 at yahoo.de>:
> main.exe c:\test.c

Would you like to try not on the root directory?

See also;
 http://llvm.org/bugs/show_bug.cgi?id=10331

...Takumi




________________________________
 Von: Peter <clang_llvm_123-4 at yahoo.de>
An: "cfe-dev at cs.uiuc.edu" <cfe-dev at cs.uiuc.edu> 
Gesendet: 12:03 Sonntag, 11.Dezember 2011
Betreff: [cfe-dev] clang::FileManager -> getFile returns NULL on Windows Visual Studio ### On Linux everything works fine
 

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/20120614/01b6e861/attachment.html>


More information about the cfe-dev mailing list