Skip to content

Commit 82ab9b7

Browse files
committed
[CMake] Instantiate missing C++ templates
(cherry picked from commit 9e7c16f)
1 parent f1869c0 commit 82ab9b7

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//===--- BridgingTemplates.cpp --------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2023 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
//
13+
// This file instantiate C++ templates required by Swift code.
14+
//
15+
//===----------------------------------------------------------------------===//
16+
17+
#include "swift/SIL/SILInstruction.h"
18+
#include "swift/SIL/SILValue.h"
19+
#include "swift/SIL/SILType.h"
20+
#include "llvm/Support/GenericDomTree.h"
21+
22+
#include <tuple>
23+
24+
using namespace swift;
25+
26+
template std::pair<SILInstruction *, SILInstruction *> std::make_pair<>(SILInstruction *&&, SILInstruction *&&);
27+
template std::pair<SILValue, SILInstruction *> std::make_pair<>(SILValue &&, SILInstruction *&&);
28+
template std::pair<SILType, SILType> std::make_pair<>(SILType &&, SILType &&);
29+
template llvm::DomTreeNodeBase<SILBasicBlock> *&std::get<0>(std::tuple<llvm::DomTreeNodeBase<SILBasicBlock> *, std::default_delete<llvm::DomTreeNodeBase<SILBasicBlock>>> &);
30+
template std::default_delete<llvm::DomTreeNodeBase<SILBasicBlock>> &std::get<1>(std::tuple<llvm::DomTreeNodeBase<SILBasicBlock> *, std::default_delete<llvm::DomTreeNodeBase<SILBasicBlock>>> &);

lib/SILOptimizer/Utils/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ target_sources(swiftSILOptimizer PRIVATE
3131
SpecializationMangler.cpp
3232
StackNesting.cpp
3333
ValueLifetime.cpp
34-
OwnershipOptUtils.cpp)
34+
OwnershipOptUtils.cpp
35+
BridgingTemplates.cpp)

0 commit comments

Comments
 (0)