From 9078a41433fdf06194a0c06cd6bf7b9f91008717 Mon Sep 17 00:00:00 2001
From: Tim Stahlhut <stahta01@gmail.com>
Date: Thu, 21 May 2020 02:16:10 -0400
Subject: llvm-8.0.1-D64937-gcc10.patch

---
 deps/llvm.mk                               |  3 ++
 deps/patches/llvm-8.0.1-D64937-gcc10.patch | 35 ++++++++++++++++++++++
 2 files changed, 38 insertions(+)
 create mode 100644 deps/patches/llvm-8.0.1-D64937-gcc10.patch

diff --git a/deps/llvm.mk b/deps/llvm.mk
index a9f677002b..d2d87186de 100644
--- a/deps/llvm.mk
+++ b/deps/llvm.mk
@@ -466,6 +466,9 @@ $(eval $(call LLVM_PATCH,llvm-8.0-D66657-codegen-degenerate)) # remove for 10.0
 $(eval $(call LLVM_PATCH,llvm-8.0-D71495-vectorize-freduce)) # remove for 10.0
 $(eval $(call LLVM_PATCH,llvm-8.0-D75072-SCEV-add-type))
 $(eval $(call LLVM_PATCH,llvm-8.0-D65174-limit-merge-stores)) # remove for 10.0
+ifneq ($(LLVM_VER_PATCH), 0)
+$(eval $(call LLVM_PATCH,llvm-8.0.1-D64937-gcc10))
+endif
 endif # LLVM_VER 8.0
 
 ifeq ($(LLVM_VER_SHORT),9.0)
diff --git a/deps/patches/llvm-8.0.1-D64937-gcc10.patch b/deps/patches/llvm-8.0.1-D64937-gcc10.patch
new file mode 100644
index 0000000000..c52b118e4b
--- /dev/null
+++ b/deps/patches/llvm-8.0.1-D64937-gcc10.patch
@@ -0,0 +1,35 @@
+From b288d90b39f4b905c02092a9bfcfd6d78f99b191 Mon Sep 17 00:00:00 2001
+From: Than McIntosh <thanm@google.com>
+Date: Fri, 19 Jul 2019 13:13:54 +0000
+Subject: [PATCH] [NFC] include cstdint/string prior to using uint8_t/string
+
+Summary: include proper header prior to use of uint8_t typedef
+and std::string.
+
+Subscribers: llvm-commits
+
+Reviewers: cherry
+
+Tags: #llvm
+
+Differential Revision: https://reviews.llvm.org/D64937
+
+llvm-svn: 366572
+---
+ llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/llvm/Demangle/MicrosoftDemangleNodes.h b/include/llvm/Demangle/MicrosoftDemangleNodes.h
+index 9e3478e9fd2..efd55339418 100644
+--- a/include/llvm/Demangle/MicrosoftDemangleNodes.h
++++ b/include/llvm/Demangle/MicrosoftDemangleNodes.h
+@@ -4,6 +4,8 @@
+ #include "llvm/Demangle/Compiler.h"
+ #include "llvm/Demangle/StringView.h"
+ #include <array>
++#include <cstdint>
++#include <string>
+ 
+ class OutputStream;
+ 
+--
-- 
