Skip to content

Commit 411c0ec

Browse files
maciejsszmigieroacmel
authored andcommitted
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]>
1 parent 53f3fee commit 411c0ec

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/perf/util/c++/clang.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ getModuleFromSource(llvm::opt::ArgStringList CFlags,
7171
CompilerInstance Clang;
7272
Clang.createDiagnostics();
7373

74+
#if CLANG_VERSION_MAJOR < 9
7475
Clang.setVirtualFileSystem(&*VFS);
76+
#else
77+
Clang.createFileManager(&*VFS);
78+
#endif
7579

7680
#if CLANG_VERSION_MAJOR < 4
7781
IntrusiveRefCntPtr<CompilerInvocation> CI =

0 commit comments

Comments
 (0)