Skip to content

[NFC] Formatting cleanup to help with next conflicts #39770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/swift/AST/Ownership.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include <stdint.h>
#include <assert.h>
#include <climits>
#include <limits.h>
#include <stdint.h>

namespace swift {

Expand Down
2 changes: 1 addition & 1 deletion include/swift/Basic/Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

#include "swift/Basic/LLVM.h"
#include "swift/Config.h"
#include "llvm/ADT/StringRef.h"
#include "clang/Basic/DarwinSDKInfo.h"
#include "llvm/ADT/StringRef.h"

namespace llvm {
class Triple;
Expand Down
13 changes: 6 additions & 7 deletions lib/Basic/Platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,14 +465,12 @@ swift::getSwiftRuntimeCompatibilityVersionForTarget(
return None;
}


static const llvm::VersionTuple minimumMacCatalystDeploymentTarget() {
return llvm::VersionTuple(13, 1);
}

llvm::VersionTuple
swift::getTargetSDKVersion(clang::DarwinSDKInfo &SDKInfo,
const llvm::Triple &triple) {
llvm::VersionTuple swift::getTargetSDKVersion(clang::DarwinSDKInfo &SDKInfo,
const llvm::Triple &triple) {
// Retrieve the SDK version.
auto SDKVersion = SDKInfo.getVersion();

Expand All @@ -481,9 +479,10 @@ swift::getTargetSDKVersion(clang::DarwinSDKInfo &SDKInfo,
// down to the linker.
if (tripleIsMacCatalystEnvironment(triple)) {
if (const auto *MacOStoMacCatalystMapping = SDKInfo.getVersionMapping(
clang::DarwinSDKInfo::OSEnvPair::macOStoMacCatalystPair())) {
return MacOStoMacCatalystMapping->map(
SDKVersion, minimumMacCatalystDeploymentTarget(), None).getValueOr(llvm::VersionTuple(0, 0, 0));
clang::DarwinSDKInfo::OSEnvPair::macOStoMacCatalystPair())) {
return MacOStoMacCatalystMapping
->map(SDKVersion, minimumMacCatalystDeploymentTarget(), None)
.getValueOr(llvm::VersionTuple(0, 0, 0));
}
return llvm::VersionTuple(0, 0, 0);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Driver/DarwinToolChains.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
#include "swift/Basic/TaskQueue.h"
#include "swift/Config.h"
#include "swift/Driver/Compilation.h"
#include "clang/Basic/DarwinSDKInfo.h"
#include "swift/Driver/Driver.h"
#include "swift/Driver/Job.h"
#include "swift/Option/Options.h"
#include "clang/Basic/DarwinSDKInfo.h"
#include "clang/Basic/Version.h"
#include "clang/Driver/Util.h"
#include "llvm/ADT/StringSwitch.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/DriverTool/swift_symbolgraph_extract_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ int swift_symbolgraph_extract_main(ArrayRef<const char *> Args,
// don't need to print these errors.
CI.removeDiagnosticConsumer(&DiagPrinter);

SmallVector<ModuleDecl *, 32> Overlays;
SmallVector<ModuleDecl *, 8> Overlays;
M->findDeclaredCrossImportOverlaysTransitive(Overlays);
for (const auto *OM : Overlays) {
auto CIM = CI.getASTContext().getModuleByName(OM->getNameStr());
Expand Down
4 changes: 2 additions & 2 deletions lib/IRGen/GenDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ void IRGenModule::emitRuntimeRegistration() {
llvm::ConstantInt::get(Int32Ty, 0),
};
auto begin = llvm::ConstantExpr::getGetElementPtr(
protocols->getType()->getPointerElementType(), protocols, beginIndices);
protocols->getType()->getPointerElementType(), protocols, beginIndices);
llvm::Constant *endIndices[] = {
llvm::ConstantInt::get(Int32Ty, 0),
llvm::ConstantInt::get(Int32Ty, SwiftProtocols.size()),
Expand Down Expand Up @@ -725,7 +725,7 @@ void IRGenModule::emitRuntimeRegistration() {
auto end = llvm::ConstantExpr::getGetElementPtr(
conformances->getType()->getPointerElementType(),
conformances, endIndices);

RegIGF.Builder.CreateCall(getRegisterProtocolConformancesFn(), {begin, end});
}

Expand Down
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Transforms/SILMem2Reg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ void StackAllocationPromoter::propagateLiveness(
// If liveness has not been propagated, go over the incoming operands and mark
// any operand values that are proactivePhis as live
livePhis.insert(proactivePhi);
SmallVector<SILValue, 16> incomingPhiVals;
SmallVector<SILValue, 4> incomingPhiVals;
proactivePhi->getIncomingPhiValues(incomingPhiVals);
for (auto &inVal : incomingPhiVals) {
auto *inPhi = dyn_cast<SILPhiArgument>(inVal);
Expand Down