clang: detect Clang builtin dirs at runtime on Unix

Authored by rjvbb on Jan 10 2019, 9:51 PM.

Description

clang: detect Clang builtin dirs at runtime on Unix

ec5477f351b6c4b25b7f6533314628ebdd7c2945 introduced runtime detection
of the clang builtin header directory on MS Windows. This commit
implements the same behaviour on Unix. Some refactoring and code
cleanup too.

Differential Revision: https://phabricator.kde.org/D17858

Details