diff options
author | Maciej S. Szmigiero <[email protected]> | 2019-12-28 18:13:14 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2020-01-14 12:02:19 -0300 |
commit | 411c0ec0b8131457cf52812de29f11dcbf491ce6 (patch) | |
tree | 708514e202a016f7847bb8cfe8012390a304dc3c | |
parent | 53f3feeb7bd2d78039b3dc9ab158bad2a5dbe012 (diff) |
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]>
-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 = |