Skip to content

Commit 61efa16

Browse files
[WebAssembly] Fix merge conflicts
1 parent d780253 commit 61efa16

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

lib/Basic/Platform.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ static StringRef getPlatformNameForDarwin(const DarwinPlatformKind platform) {
171171
StringRef swift::getPlatformNameForTriple(const llvm::Triple &triple) {
172172
switch (triple.getOS()) {
173173
case llvm::Triple::UnknownOS:
174-
if (triple.isOSBinFormatWasm())
175-
return "wasm";
176174
llvm_unreachable("unknown OS");
177175
case llvm::Triple::Ananas:
178176
case llvm::Triple::CloudABI:

lib/IRGen/MetadataRequest.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2427,9 +2427,6 @@ emitMetadataAccessByMangledName(IRGenFunction &IGF, CanType type,
24272427
stringAddrOffset);
24282428
stringAddr = subIGF.Builder.CreateIntToPtr(stringAddr, IGM.Int8PtrTy);
24292429
}
2430-
auto stringAddr = subIGF.Builder.CreateAdd(stringAddrBase,
2431-
stringAddrOffset);
2432-
stringAddr = subIGF.Builder.CreateIntToPtr(stringAddr, IGM.Int8PtrTy);
24332430

24342431
llvm::CallInst *call;
24352432
if (request.isStaticallyAbstract()) {

lib/SIL/TypeLowering.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2645,20 +2645,18 @@ TypeConverter::checkFunctionForABIDifferences(SILModule &M,
26452645
if (rep1 != rep2) {
26462646
if (rep1 == SILFunctionTypeRepresentation::Thin &&
26472647
rep2 == SILFunctionTypeRepresentation::Thick) {
2648+
// There is no ABI compatibility between thin and thick on WebAssembly,
2649+
// so need thunk.
2650+
if (M.getASTContext().LangOpts.Target.isOSBinFormatWasm()) {
2651+
return ABIDifference::NeedsThunk;
2652+
}
26482653
if (DifferentFunctionTypesHaveDifferentRepresentation) {
26492654
// FIXME: check whether the representations are compatible modulo
26502655
// context
26512656
return ABIDifference::CompatibleCallingConvention_ThinToThick;
26522657
} else {
26532658
return ABIDifference::CompatibleRepresentation_ThinToThick;
26542659
}
2655-
2656-
// There is no ABI compatibility between thin and thick on WebAssembly,
2657-
// so need thunk.
2658-
if (M.getASTContext().LangOpts.Target.isOSBinFormatWasm()) {
2659-
return ABIDifference::NeedsThunk;
2660-
}
2661-
return ABIDifference::ThinToThick;
26622660
}
26632661
return ABIDifference::NeedsThunk;
26642662
}

0 commit comments

Comments
 (0)