This is an archive of the discontinued LLVM Phabricator instance.

[libclang] Add entry points that take a full command line including argv[0].
ClosedPublic

Authored by bkramer on Nov 16 2015, 2:10 AM.

Details

Summary

This provides both a more uniform interface and makes libclang behave like
clang tooling wrt relative paths against argv[0]. This is necessary for
finding paths to a c++ standard library relative to a clang binary given
in a compilation database. It can also be used to find paths relative to
libclang.so if the full path to it is passed in.

Diff Detail

Repository
rL LLVM

Event Timeline

bkramer updated this revision to Diff 40257.Nov 16 2015, 2:10 AM
bkramer retitled this revision from to [libclang] Add entry points that take a full command line including argv[0]..
bkramer updated this object.
bkramer added a reviewer: klimek.
bkramer added a subscriber: cfe-commits.
klimek added inline comments.Nov 16 2015, 2:29 AM
include/clang-c/Index.h
5694–5695 ↗(On Diff #40257)

We should probably expand on why users would want to use on or the other here...

bkramer updated this revision to Diff 40269.Nov 16 2015, 3:31 AM
  • Add a test case to make sure argv[0] handling actually works.
  • Clarify comments a bit.
klimek accepted this revision.Nov 18 2015, 7:58 AM
klimek edited edge metadata.

LG

This revision is now accepted and ready to land.Nov 18 2015, 7:58 AM
This revision was automatically updated to reflect the committed changes.