Issues with latest Clang Build

   I just built the latest version of clang. I am creating an AST and
parsing it using my custom visitor. While creating the CompilerInstance
variable, I add the following code to search for C++ headers :

//HeaderSearchOptions headerSearch = TheCompInst.getHeaderSearchOpts();
    HeaderSearchOptions headerSearchOptions;

    // <Warning!!> -- Platform Specific Code lives here
    // This depends on A) that you're running linux and
    // B) that you have the same GCC LIBs installed.
    vector<string> paths;

    for (vector<string>::iterator begin = paths.begin()
                                , end = paths. end(); begin != end; begin++)

    When I run my code on a file containing "#include <string>" or similar
libraries, it gives a number of errors like these, "error: use of undeclared
identifier '_atomic_fetch_add' ". How do I resolve this issue? It is ok if
the code is platform specific.