Esempio n. 1
0
void ClangCompiler::AddIncludeSearchPath(const string &inc_path, Options type)
{
#if CLANG_VERSION_MAJOR == 3
#   if CLANG_VERSION_MINOR == 0
    bool is_user_path = true;
#   endif
#endif
    frontend::IncludeDirGroup inc_group = frontend::Angled;
    if (type == IncludePathSystem) {
#if CLANG_VERSION_MAJOR == 3
#   if CLANG_VERSION_MINOR == 0
        is_user_path = false;
#   endif
#endif
        inc_group = frontend::System;
    }

    HeaderSearchOptions &header_search =
        invocation_->getHeaderSearchOpts();

    char_separator<char> path_sep(":");
    tokenizer<char_separator<char> > path_tokens(inc_path, path_sep);
    tokenizer<char_separator<char> >::iterator tok_iter;
    for (tok_iter = path_tokens.begin();
         tok_iter != path_tokens.end(); ++tok_iter)
#if CLANG_VERSION_MAJOR == 3
#   if CLANG_VERSION_MINOR == 0
        header_search.AddPath(*tok_iter, inc_group, is_user_path,
                              false, false);
#   elif CLANG_VERSION_MINOR == 5
        header_search.AddPath(*tok_iter, inc_group, false, false);
#   endif
#endif
}
Esempio n. 2
0
File: req.c Progetto: RAttab/optics
size_t crest_req_get_path_tokens(struct crest_req *req)
{
    const struct path *path = crest_req_get_path(req);
    return path_tokens(path);
}