Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hexagon] Change declaration order of unique_ptr objects to fix crash #8859

Merged
merged 1 commit into from
Aug 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/target/llvm/codegen_hexagon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -704,8 +704,8 @@ runtime::Module BuildHexagon(IRModule mod, Target target) {
(void)CallOnce;

std::unique_ptr<llvm::TargetMachine> tm = GetLLVMTargetMachine(target);
std::unique_ptr<CodeGenHexagon> cg(new CodeGenHexagon());
std::unique_ptr<llvm::LLVMContext> ctx(new llvm::LLVMContext());
std::unique_ptr<CodeGenHexagon> cg(new CodeGenHexagon());
cg->Init("TVMHexagonModule", tm.get(), ctx.get(), false, false, false);
for (auto kv : mod->functions) {
ICHECK(kv.second->IsInstance<PrimFuncNode>()) << "Can only lower IR Module with PrimFuncs";
Expand Down