Skip to content

Commit c01a9b1

Browse files
committed
Update master-next for upstream changes
1 parent 26a132b commit c01a9b1

File tree

4 files changed

+16
-18
lines changed

4 files changed

+16
-18
lines changed

lib/IRGen/MetadataRequest.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2074,11 +2074,11 @@ emitMetadataAccessByMangledName(IRGenFunction &IGF, CanType type,
20742074
}
20752075

20762076
// Get or create a shared helper function to do the instantiation.
2077-
auto instantiationFn = cast<llvm::Function>(
2078-
IGM.getModule()
2079-
->getOrInsertFunction("__swift_instantiateConcreteTypeFromMangledName",
2080-
IGF.IGM.TypeMetadataPtrTy, cache->getType())
2081-
->stripPointerCasts());
2077+
auto *instantiationFnTy = llvm::FunctionType::get(IGF.IGM.TypeMetadataPtrTy,
2078+
{cache->getType()}, false);
2079+
auto instantiationFn = llvm::Function::Create(
2080+
instantiationFnTy, llvm::Function::ExternalLinkage,
2081+
"__swift_instantiateConcreteTypeFromMangledName", IGM.getModule());
20822082
if (instantiationFn->empty()) {
20832083
ApplyIRLinkage(IRLinkage::InternalLinkOnceODR)
20842084
.to(instantiationFn);

lib/SIL/AbstractionPattern.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,7 @@ AbstractionPattern::getCXXMethodSelfPattern(CanType selfType) const {
366366
// Use the clang type for the receiver type. If this is ever
367367
// insufficient --- if we have interesting bridging to do to
368368
// 'self' --- we have the right information to be more exact.
369-
auto clangSelfType =
370-
CXXMethod->getThisType(CXXMethod->getASTContext()).getTypePtr();
369+
auto clangSelfType = CXXMethod->getThisType().getTypePtr();
371370
return AbstractionPattern(getGenericSignatureForFunctionComponent(),
372371
selfType, clangSelfType);
373372
}

lib/TBDGen/tapi/YAML.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -191,16 +191,15 @@ QuotingType ScalarTraits<UUID>::mustQuote(StringRef) {
191191
return QuotingType::Single;
192192
}
193193

194-
using clang::InputKind;
195-
void ScalarEnumerationTraits<InputKind::Language>::enumeration(
196-
IO &io, InputKind::Language &kind) {
197-
io.enumCase(kind, "c", InputKind::C);
198-
io.enumCase(kind, "cxx", InputKind::CXX);
199-
io.enumCase(kind, "objective-c", InputKind::ObjC);
200-
io.enumCase(kind, "objc", InputKind::ObjC); // to keep old snapshots working.
201-
io.enumCase(kind, "objective-cxx", InputKind::ObjCXX);
194+
using clang::Language;
195+
void ScalarEnumerationTraits<Language>::enumeration(IO &io, Language &kind) {
196+
io.enumCase(kind, "c", Language::C);
197+
io.enumCase(kind, "cxx", Language::CXX);
198+
io.enumCase(kind, "objective-c", Language::ObjC);
199+
io.enumCase(kind, "objc", Language::ObjC); // to keep old snapshots working.
200+
io.enumCase(kind, "objective-cxx", Language::ObjCXX);
202201
io.enumCase(kind, "objcxx",
203-
InputKind::ObjCXX); // to keep old snapshots working.
202+
Language::ObjCXX); // to keep old snapshots working.
204203
}
205204

206205
} // end namespace yaml.

lib/TBDGen/tapi/YAML.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ template <> struct ScalarTraits<UUID> {
9191
};
9292

9393
using clang::InputKind;
94-
template <> struct ScalarEnumerationTraits<InputKind::Language> {
95-
static void enumeration(IO &io, InputKind::Language &kind);
94+
template <> struct ScalarEnumerationTraits<clang::Language> {
95+
static void enumeration(IO &io, clang::Language &kind);
9696
};
9797

9898
} // end namespace yaml.

0 commit comments

Comments
 (0)