mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge branch 'main' into rebranch
Conflicts:
lib/Basic/Platform.cpp
```
diff --git a/lib/Basic/Platform.cpp b/lib/Basic/Platform.cpp
index 240edfa144a..1797c87635f 100644
--- a/lib/Basic/Platform.cpp
+++ b/lib/Basic/Platform.cpp
@@ -200,10 +200,7 @@ StringRef swift::getPlatformNameForTriple(const llvm::Triple &triple) {
case llvm::Triple::CUDA:
case llvm::Triple::DragonFly:
case llvm::Triple::DriverKit:
-<<<<<<< HEAD
case llvm::Triple::ELFIAMCU:
-=======
->>>>>>> main
case llvm::Triple::Emscripten:
case llvm::Triple::Fuchsia:
case llvm::Triple::HermitCore:
```
This commit is contained in:
@@ -1321,21 +1321,25 @@ void Serializer::writeInputBlock() {
|
||||
time_t importedHeaderModTime = 0;
|
||||
std::string contents;
|
||||
auto importedHeaderPath = Options.ImportedHeader;
|
||||
std::string pchIncludeTree;
|
||||
// We do not want to serialize the explicitly-specified .pch path if one was
|
||||
// provided. Instead we write out the path to the original header source so
|
||||
// that clients can consume it.
|
||||
if (Options.ExplicitModuleBuild &&
|
||||
llvm::sys::path::extension(importedHeaderPath)
|
||||
.ends_with(file_types::getExtension(file_types::TY_PCH)))
|
||||
importedHeaderPath = clangImporter->getClangInstance()
|
||||
.getASTReader()
|
||||
->getModuleManager()
|
||||
.lookupByFileName(importedHeaderPath)
|
||||
->OriginalSourceFileName;
|
||||
.ends_with(file_types::getExtension(file_types::TY_PCH))) {
|
||||
auto *pch = clangImporter->getClangInstance()
|
||||
.getASTReader()
|
||||
->getModuleManager()
|
||||
.lookupByFileName(importedHeaderPath);
|
||||
pchIncludeTree = pch->IncludeTreeID;
|
||||
importedHeaderPath = pch->OriginalSourceFileName;
|
||||
}
|
||||
|
||||
if (!importedHeaderPath.empty()) {
|
||||
contents = clangImporter->getBridgingHeaderContents(
|
||||
importedHeaderPath, importedHeaderSize, importedHeaderModTime);
|
||||
importedHeaderPath, importedHeaderSize, importedHeaderModTime,
|
||||
pchIncludeTree);
|
||||
}
|
||||
assert(publicImportSet.count(bridgingHeaderImport));
|
||||
ImportedHeader.emit(ScratchRecord,
|
||||
|
||||
Reference in New Issue
Block a user