Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp12301755ybl; Sat, 28 Dec 2019 09:14:32 -0800 (PST) X-Google-Smtp-Source: APXvYqxFkBkqhp7obbIXu8WsrVmTF4HpIqS8bS4YYhlfjOKCYzze16FsSQEHWNBOXWoCjmucVWh+ X-Received: by 2002:aca:c386:: with SMTP id t128mr4652826oif.32.1577553272112; Sat, 28 Dec 2019 09:14:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577553272; cv=none; d=google.com; s=arc-20160816; b=eiEkoUuAaW71v0ZBupfif8MYl4o3jrB28LYtsyElJ8PMnMiquqC5iqEPz6qpK9z1yW yASeAvTCPiO1F9LJnKKAOhpO4ujstsL/+ysrtK68DF37VN4inmOV8Nl2a0GgfNPhI2Qc lLUj50FIwr4PVcl7xi+jGJMhLvXQ3RFqDUgIGU1HJLVq+x+rBqTlq5JeJIbN8uKMGRG4 65UbEvmocqfRpF3npoYT3ZuR14ZVl3bRCNGz80T/I7pewYKkjMuBxeTEihSpZKGXnmLO 3pzGsGiTqXI6XDVKPjtA6ZMyeYURt8TOceXfMSG/Xv/UuTtQ4PBq/Svd5BGT+gCnjrir UCcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=JDYGnx9/vZm+T4ZhSsWJi7dAV+VAdADhtUl7xgeDo0w=; b=evykjKQteZbTK+A01IhkWI+DBMdlF8lJXctPEpze/liOcalY98/l36y17E0HlQZWrG am+ddoLtlDiIaEIZe870+/Pe8/YQDkX9CqMmOPa+V4OIMlEMB/j00UYeJq3h2EkT7/sM QuR6ZLN+ovP9Jk1zmZpcstyJF+TPEaeIuINgqoh/GifiojNf7NosG1iu+0Y1Z/NFxJ8K EKNrSy4WMY5wHZSSSYGKqsOY/hZDSL2m9ZrhO8tll5iTrCQV3tJcfaqoulzSgmoXqoab JJiASX/7GY+ifCM7ZeUElFECCnUPZUvsrfbRcleA9Oq+P+hCcC3qgWuOLOAy4ZJ4krjy PrAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s16si15773753oih.4.2019.12.28.09.14.19; Sat, 28 Dec 2019 09:14:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726329AbfL1RNj (ORCPT + 99 others); Sat, 28 Dec 2019 12:13:39 -0500 Received: from vps-vb.mhejs.net ([37.28.154.113]:34470 "EHLO vps-vb.mhejs.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726088AbfL1RNj (ORCPT ); Sat, 28 Dec 2019 12:13:39 -0500 Received: from MUA by vps-vb.mhejs.net with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1ilFeX-0003Tn-Tw; Sat, 28 Dec 2019 18:13:25 +0100 From: "Maciej S. Szmigiero" To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo Cc: Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Dennis Schridde , Denis Pronin , Naohiro Aota , clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: [PATCH] perf clang: Fix build with Clang 9 Date: Sat, 28 Dec 2019 18:13:14 +0100 Message-Id: <20191228171314.946469-2-mail@maciej.szmigiero.name> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Dennis Schridde --- tools/perf/util/c++/clang.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 CI =