[llvm] e77e14e - Workaround an assertion failure during module build
Steven Wu via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 13 10:42:36 PST 2022
Author: Steven Wu
Date: 2022-12-13T10:42:17-08:00
New Revision: e77e14ecf17bba5f9e2ef43d8c3dbc9c86685287
URL: https://github.com/llvm/llvm-project/commit/e77e14ecf17bba5f9e2ef43d8c3dbc9c86685287
DIFF: https://github.com/llvm/llvm-project/commit/e77e14ecf17bba5f9e2ef43d8c3dbc9c86685287.diff
LOG: Workaround an assertion failure during module build
After the change in https://reviews.llvm.org/D131858, clang cannot
bootstrap itself with modules due to assertion failure:
(lvaluePath->getType() == elemTy && "Unexpected type reference!")
Workaround the assertion by converting some of the includes into forward
declares.
Reviewed By: arphaman
Differential Revision: https://reviews.llvm.org/D139956
Added:
Modified:
llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
llvm/include/llvm/ExecutionEngine/Orc/SpeculateAnalyses.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h b/llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
index 30af7a628e913..89bcc6e8f0db3 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
@@ -39,7 +39,6 @@
#include "llvm/IR/Type.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/raw_ostream.h"
-#include "llvm/Transforms/Utils/ValueMapper.h"
#include <algorithm>
#include <cassert>
#include <functional>
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h b/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
index d659d6ae6b49a..311bbbf68e09b 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
@@ -18,10 +18,11 @@
#include "llvm/ExecutionEngine/JITSymbol.h"
#include "llvm/ExecutionEngine/Orc/Core.h"
#include "llvm/ExecutionEngine/Orc/OrcABISupport.h"
+#include "llvm/IR/ValueHandle.h"
+#include "llvm/IR/ValueMap.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/Memory.h"
#include "llvm/Support/Process.h"
-#include "llvm/Transforms/Utils/ValueMapper.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
@@ -47,6 +48,9 @@ class Twine;
class Value;
class MCDisassembler;
class MCInstrAnalysis;
+class ValueMaterializer;
+
+using ValueToValueMapTy = ValueMap<const Value *, WeakTrackingVH>;
namespace jitlink {
class LinkGraph;
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/SpeculateAnalyses.h b/llvm/include/llvm/ExecutionEngine/Orc/SpeculateAnalyses.h
index 675657281752e..2db6e1772ad18 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/SpeculateAnalyses.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/SpeculateAnalyses.h
@@ -13,7 +13,6 @@
#ifndef LLVM_EXECUTIONENGINE_ORC_SPECULATEANALYSES_H
#define LLVM_EXECUTIONENGINE_ORC_SPECULATEANALYSES_H
-#include "llvm/Analysis/BranchProbabilityInfo.h"
#include "llvm/ExecutionEngine/Orc/Core.h"
#include "llvm/ExecutionEngine/Orc/Speculation.h"
@@ -21,6 +20,8 @@
namespace llvm {
+class BranchProbabilityInfo;
+
namespace orc {
// Provides common code.
More information about the llvm-commits
mailing list