Skip to content

Commit 743bcbc

Browse files
[WebAssembly] Fix merge conflicts
1 parent ed87929 commit 743bcbc

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

lib/Basic/Platform.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ static StringRef getPlatformNameForDarwin(const DarwinPlatformKind platform) {
138138
StringRef swift::getPlatformNameForTriple(const llvm::Triple &triple) {
139139
switch (triple.getOS()) {
140140
case llvm::Triple::UnknownOS:
141-
if (triple.isOSBinFormatWasm())
142-
return "wasm";
143141
llvm_unreachable("unknown OS");
144142
case llvm::Triple::Ananas:
145143
case llvm::Triple::CloudABI:

lib/IRGen/MetadataRequest.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -2301,9 +2301,6 @@ emitMetadataAccessByMangledName(IRGenFunction &IGF, CanType type,
23012301
stringAddrOffset);
23022302
stringAddr = subIGF.Builder.CreateIntToPtr(stringAddr, IGM.Int8PtrTy);
23032303
}
2304-
auto stringAddr = subIGF.Builder.CreateAdd(stringAddrBase,
2305-
stringAddrOffset);
2306-
stringAddr = subIGF.Builder.CreateIntToPtr(stringAddr, IGM.Int8PtrTy);
23072304

23082305
llvm::CallInst *call;
23092306
if (request.isStaticallyAbstract()) {

lib/SIL/TypeLowering.cpp

+5-7
Original file line numberDiff line numberDiff line change
@@ -2621,20 +2621,18 @@ TypeConverter::checkFunctionForABIDifferences(SILModule &M,
26212621
if (rep1 != rep2) {
26222622
if (rep1 == SILFunctionTypeRepresentation::Thin &&
26232623
rep2 == SILFunctionTypeRepresentation::Thick) {
2624+
// There is no ABI compatibility between thin and thick on WebAssembly,
2625+
// so need thunk.
2626+
if (M.getASTContext().LangOpts.Target.isOSBinFormatWasm()) {
2627+
return ABIDifference::NeedsThunk;
2628+
}
26242629
if (DifferentFunctionTypesHaveDifferentRepresentation) {
26252630
// FIXME: check whether the representations are compatible modulo
26262631
// context
26272632
return ABIDifference::CompatibleCallingConvention_ThinToThick;
26282633
} else {
26292634
return ABIDifference::CompatibleRepresentation_ThinToThick;
26302635
}
2631-
2632-
// There is no ABI compatibility between thin and thick on WebAssembly,
2633-
// so need thunk.
2634-
if (M.getASTContext().LangOpts.Target.isOSBinFormatWasm()) {
2635-
return ABIDifference::NeedsThunk;
2636-
}
2637-
return ABIDifference::ThinToThick;
26382636
}
26392637
return ABIDifference::NeedsThunk;
26402638
}

0 commit comments

Comments
 (0)