diff options
| author | Maciej S. Szmigiero <[email protected]> | 2019-12-28 17:13:14 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2020-01-14 15:02:19 +0000 |
| commit | 411c0ec0b8131457cf52812de29f11dcbf491ce6 (patch) | |
| tree | 708514e202a016f7847bb8cfe8012390a304dc3c /tools/perf/util/c++/clang.cpp | |
| parent | Merge tag 'perf-core-for-mingo-5.6-20200106' of git://git.kernel.org/pub/scm/... (diff) | |
| download | kernel-411c0ec0b8131457cf52812de29f11dcbf491ce6.tar.gz kernel-411c0ec0b8131457cf52812de29f11dcbf491ce6.zip | |
perf clang: Fix build with Clang 9
LLVM D59377 (included in Clang 9) refactored Clang VFS construction a
bit, which broke perf clang build. Let's fix it.
Signed-off-by: Maciej S. Szmigiero <[email protected]>
Reviewed-by: Dennis Schridde <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: [email protected]
Cc: Denis Pronin <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Naohiro Aota <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/c++/clang.cpp')
| -rw-r--r-- | tools/perf/util/c++/clang.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/c++/clang.cpp b/tools/perf/util/c++/clang.cpp index fc361c3f8570..c8885dfa3667 100644 --- a/tools/perf/util/c++/clang.cpp +++ b/tools/perf/util/c++/clang.cpp @@ -71,7 +71,11 @@ getModuleFromSource(llvm::opt::ArgStringList CFlags, CompilerInstance Clang; Clang.createDiagnostics(); +#if CLANG_VERSION_MAJOR < 9 Clang.setVirtualFileSystem(&*VFS); +#else + Clang.createFileManager(&*VFS); +#endif #if CLANG_VERSION_MAJOR < 4 IntrusiveRefCntPtr<CompilerInvocation> CI = |
