From 58a44f9905b126a4417724c1f794d762a77752bf Mon Sep 17 00:00:00 2001 From: Andrea Di Biagio Date: Fri, 9 Aug 2019 12:41:24 +0000 Subject: [PATCH] [MCA] Fix MSVC 19.16 build with libc++ MSVC (19.16) wants to see the definition of Instruction in `std::pair SourceRef` to decide if it is assignable. Patch by Orivej Desh. Differential Revision: https://reviews.llvm.org/D65844 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368436 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/MCA/SourceMgr.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/llvm/MCA/SourceMgr.h b/include/llvm/MCA/SourceMgr.h index dbe31db1b1d..e844171bdca 100644 --- a/include/llvm/MCA/SourceMgr.h +++ b/include/llvm/MCA/SourceMgr.h @@ -16,12 +16,13 @@ #define LLVM_MCA_SOURCEMGR_H #include "llvm/ADT/ArrayRef.h" +#include "llvm/MCA/Instruction.h" namespace llvm { namespace mca { -class Instruction; - +// MSVC >= 19.15, < 19.20 need to see the definition of class Instruction to +// prevent compiler error C2139 about intrinsic type trait '__is_assignable'. typedef std::pair SourceRef; class SourceMgr { -- 2.40.0