[PATCH] D139956: Workaround an assertion failure during module build
Steven Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 13 10:37:57 PST 2022
steven_wu created this revision.
steven_wu added reviewers: mizvekov, arphaman.
Herald added a subscriber: ributzka.
Herald added a project: All.
steven_wu requested review of this revision.
Herald added a project: LLVM.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D139956
Files:
llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
llvm/include/llvm/ExecutionEngine/Orc/SpeculateAnalyses.h
Index: llvm/include/llvm/ExecutionEngine/Orc/SpeculateAnalyses.h
===================================================================
--- llvm/include/llvm/ExecutionEngine/Orc/SpeculateAnalyses.h
+++ 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.
Index: llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
===================================================================
--- llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
+++ 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 Value;
class MCDisassembler;
class MCInstrAnalysis;
+class ValueMaterializer;
+
+using ValueToValueMapTy = ValueMap<const Value *, WeakTrackingVH>;
namespace jitlink {
class LinkGraph;
Index: llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
===================================================================
--- llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
+++ 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>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139956.482552.patch
Type: text/x-patch
Size: 2056 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221213/5575bb49/attachment.bin>
More information about the llvm-commits
mailing list