diff options
author | Wang Nan <wangnan0@huawei.com> | 2016-11-26 07:03:35 +0000 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-12-05 15:51:44 -0300 |
commit | 77dfa84a843c0bc935a6c8664f2556573e30845f (patch) | |
tree | 476af5d009d076632647e92dc5cbe8b131cae420 /tools/perf/util/c++/clang.h | |
parent | 00b86691c77c6576861b82a3cfe4d609800758fe (diff) | |
download | op-kernel-dev-77dfa84a843c0bc935a6c8664f2556573e30845f.zip op-kernel-dev-77dfa84a843c0bc935a6c8664f2556573e30845f.tar.gz |
perf clang: Use real file system for #include
Utilize clang's OverlayFileSystem facility, allow CompilerInstance to
access real file system.
With this patch the '#include' directive can be used.
Add a new getModuleFromSource for real file.
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Alexei Starovoitov <ast@fb.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Joe Stringer <joe@ovn.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/20161126070354.141764-12-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/c++/clang.h')
-rw-r--r-- | tools/perf/util/c++/clang.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/c++/clang.h b/tools/perf/util/c++/clang.h index f64483b..90aff01 100644 --- a/tools/perf/util/c++/clang.h +++ b/tools/perf/util/c++/clang.h @@ -12,5 +12,8 @@ using namespace llvm; std::unique_ptr<Module> getModuleFromSource(StringRef Name, StringRef Content); +std::unique_ptr<Module> +getModuleFromSource(StringRef Path); + } #endif |