Skip to content

Commit 00caeb6

Browse files
Suyash SrijanSuyash Srijan
authored andcommitted
---
yaml --- r: 275455 b: refs/heads/master-next c: 52b833d h: refs/heads/master i: 275453: b24a97c 275451: 08468a6 275447: 10f10ec 275439: 2f97917 275423: 34a38b5 275391: eef4d91 275327: f04b868 275199: 8aa8ecf 274943: 588dd85 274431: dece103
1 parent 73960fb commit 00caeb6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+79
-1019
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 65b3164726f2e62dff31e90a5cb5e3fb67cc82bf
3-
refs/heads/master-next: 43fd0c50a53ce6a59923c6ee691743407ae5bea7
3+
refs/heads/master-next: 52b833d54313247a3f4da49003964adaec7dc7de
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ option(SWIFT_RUNTIME_CRASH_REPORTER_CLIENT
235235
FALSE)
236236

237237
option(SWIFT_DARWIN_ENABLE_STABLE_ABI_BIT
238-
"Enable the Swift stable ABI's class marker bit for new deployment targets"
239-
TRUE)
238+
"Enable the Swift stable ABI's class marker bit"
239+
FALSE)
240240

241241
set(SWIFT_DARWIN_XCRUN_TOOLCHAIN "XcodeDefault" CACHE STRING
242242
"The name of the toolchain to pass to 'xcrun'")

branches/master-next/cmake/modules/AddSwift.cmake

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,15 +1209,6 @@ function(_add_swift_library_single target name)
12091209
"${SWIFTLIB_SINGLE_FORCE_BUILD_OPTIMIZED_keyword}"
12101210
RESULT_VAR_NAME c_compile_flags
12111211
)
1212-
1213-
if(SWIFTLIB_IS_STDLIB)
1214-
# We don't ever want to link against the ABI-breakage checking symbols
1215-
# in the standard library, runtime, or overlays because they only rely
1216-
# on the header parts of LLVM's ADT.
1217-
list(APPEND c_compile_flags
1218-
"-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1")
1219-
endif()
1220-
12211212
if(SWIFTLIB_SINGLE_SDK STREQUAL WINDOWS)
12221213
if(libkind STREQUAL SHARED)
12231214
list(APPEND c_compile_flags -D_WINDLL)

branches/master-next/include/swift/ABI/Metadata.h

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,31 +1192,6 @@ struct TargetClassMetadata : public TargetAnyClassMetadata<Runtime> {
11921192
return bounds;
11931193
}
11941194

1195-
/// Given a statically-emitted metadata template, this sets the correct
1196-
/// "is Swift" bit for the current runtime. Depending on the deployment
1197-
/// target a binary was compiled for, statically emitted metadata templates
1198-
/// may have a different bit set from the one that this runtime canonically
1199-
/// considers the "is Swift" bit.
1200-
void setAsTypeMetadata() {
1201-
// If the wrong "is Swift" bit is set, set the correct one.
1202-
//
1203-
// Note that the only time we should see the "new" bit set while
1204-
// expecting the "old" one is when running a binary built for a
1205-
// new OS on an old OS, which is not supported, however we do
1206-
// have tests that exercise this scenario.
1207-
auto otherSwiftBit = (3ULL - SWIFT_CLASS_IS_SWIFT_MASK);
1208-
assert(otherSwiftBit == 1ULL || otherSwiftBit == 2ULL);
1209-
1210-
if ((this->Data & 3) == otherSwiftBit) {
1211-
this->Data ^= 3;
1212-
}
1213-
1214-
// Otherwise there should be nothing to do, since only the old "is
1215-
// Swift" bit is used for backward-deployed runtimes.
1216-
1217-
assert(isTypeMetadata());
1218-
}
1219-
12201195
static bool classof(const TargetMetadata<Runtime> *metadata) {
12211196
return metadata->getKind() == MetadataKind::Class;
12221197
}

branches/master-next/include/swift/LLVMPasses/Passes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace swift {
3030
const llvm::PreservedAnalyses &) { return false; }
3131

3232
using AAResultBase::getModRefInfo;
33-
llvm::ModRefInfo getModRefInfo(const llvm::CallBase *Call,
33+
llvm::ModRefInfo getModRefInfo(llvm::ImmutableCallSite CS,
3434
const llvm::MemoryLocation &Loc);
3535
};
3636

branches/master-next/include/swift/Runtime/BackDeployment.h

Lines changed: 0 additions & 45 deletions
This file was deleted.

branches/master-next/include/swift/Runtime/CMakeConfig.h.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,5 @@
55
#define SWIFT_RUNTIME_CMAKECONFIG_H
66

77
#cmakedefine01 SWIFT_DARWIN_ENABLE_STABLE_ABI_BIT
8-
#cmakedefine01 SWIFT_BNI_OS_BUILD
9-
#cmakedefine01 SWIFT_BNI_XCODE_BUILD
108

119
#endif
Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,2 @@
1-
# Detect B&I builds.
2-
set(SWIFT_BNI_OS_BUILD FALSE)
3-
set(SWIFT_BNI_XCODE_BUILD FALSE)
4-
if(DEFINED ENV{RC_XBS})
5-
if(NOT DEFINED ENV{RC_XCODE} OR NOT "$ENV{RC_XCODE}")
6-
set(SWIFT_BNI_OS_BUILD TRUE)
7-
else()
8-
set(SWIFT_BNI_XCODE_BUILD TRUE)
9-
endif()
10-
endif()
11-
121
configure_file(CMakeConfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/CMakeConfig.h
132
ESCAPE_QUOTES @ONLY)

branches/master-next/include/swift/Runtime/Config.h

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -141,27 +141,10 @@
141141
/// Which bits in the class metadata are used to distinguish Swift classes
142142
/// from ObjC classes?
143143
#ifndef SWIFT_CLASS_IS_SWIFT_MASK
144-
145-
// Non-Apple platforms always use 1.
146-
# if !defined(__APPLE__)
147-
# define SWIFT_CLASS_IS_SWIFT_MASK 1ULL
148-
149-
// Builds for Swift-in-the-OS always use 2.
150-
# elif SWIFT_BNI_OS_BUILD
144+
# if defined(__APPLE__) && SWIFT_OBJC_INTEROP && SWIFT_DARWIN_ENABLE_STABLE_ABI_BIT
151145
# define SWIFT_CLASS_IS_SWIFT_MASK 2ULL
152-
153-
// Builds for Xcode always use 1.
154-
# elif SWIFT_BNI_XCODE_BUILD
155-
# define SWIFT_CLASS_IS_SWIFT_MASK 1ULL
156-
157-
// Other builds (such as local builds on developers' computers)
158-
// dynamically choose the bit at runtime based on the current OS
159-
// version.
160146
# else
161-
# define SWIFT_CLASS_IS_SWIFT_MASK _swift_classIsSwiftMask
162-
# define SWIFT_CLASS_IS_SWIFT_MASK_GLOBAL_VARIABLE 1
163-
# include "BackDeployment.h"
164-
147+
# define SWIFT_CLASS_IS_SWIFT_MASK 1ULL
165148
# endif
166149
#endif
167150

branches/master-next/include/swift/SwiftRemoteMirror/SwiftRemoteMirror.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737
extern "C" {
3838
#endif
3939

40-
extern unsigned long long swift_reflection_classIsSwiftMask;
41-
4240
/// Get the metadata version supported by the Remote Mirror library.
4341
SWIFT_REMOTE_MIRROR_LINKAGE
4442
uint16_t swift_reflection_getSupportedMetadataVersion(void);

branches/master-next/lib/Basic/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ macro(find_first_existing_vc_file out_var path)
3030
)
3131
endmacro()
3232

33-
set(generate_vcs_version_script "${LLVM_MAIN_SRC_DIR}/cmake/modules/GenerateVersionFromVCS.cmake")
33+
set(get_svn_script "${LLVM_MAIN_SRC_DIR}/cmake/modules/GetSVN.cmake")
3434

3535
function(generate_revision_inc revision_inc_var name dir)
3636
find_first_existing_vc_file(dep_file "${dir}")
@@ -39,12 +39,12 @@ function(generate_revision_inc revision_inc_var name dir)
3939
string(TOUPPER ${name} upper_name)
4040
if(DEFINED dep_file)
4141
add_custom_command(OUTPUT "${revision_inc}"
42-
DEPENDS "${dep_file}" "${generate_vcs_version_script}"
42+
DEPENDS "${dep_file}" "${get_svn_script}"
4343
COMMAND
44-
${CMAKE_COMMAND} "-DNAMES=${upper_name}"
45-
"-D${upper_name}_SOURCE_DIR=${dir}"
44+
${CMAKE_COMMAND} "-DFIRST_SOURCE_DIR=${dir}"
45+
"-DFIRST_NAME=${upper_name}"
4646
"-DHEADER_FILE=${revision_inc}"
47-
-P "${generate_vcs_version_script}")
47+
-P "${get_svn_script}")
4848
else()
4949
# Generate an empty Revision.inc file if we are not using git or SVN.
5050
file(WRITE "${revision_inc}" "")

branches/master-next/lib/Basic/Platform.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ StringRef swift::getPlatformNameForTriple(const llvm::Triple &triple) {
142142
case llvm::Triple::AMDPAL:
143143
case llvm::Triple::HermitCore:
144144
case llvm::Triple::Hurd:
145-
case llvm::Triple::WASI:
146145
return "";
147146
case llvm::Triple::Darwin:
148147
case llvm::Triple::MacOSX:

branches/master-next/lib/ClangImporter/ClangImporter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,8 @@ ClangImporter::create(ASTContext &ctx,
10111011
clangDiags.setSeverity(clang::diag::err_module_not_built,
10121012
clang::diag::Severity::Error,
10131013
clang::SourceLocation());
1014-
clangDiags.setFatalsAsError(ctx.Diags.getShowDiagnosticsAfterFatalError());
1014+
clangDiags.setSuppressAfterFatalError(
1015+
!ctx.Diags.getShowDiagnosticsAfterFatalError());
10151016

10161017

10171018
// Create the associated action.

branches/master-next/lib/ClangImporter/ImportDecl.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8053,7 +8053,6 @@ ClangImporter::Implementation::createConstant(Identifier name, DeclContext *dc,
80538053
case clang::APValue::Array:
80548054
case clang::APValue::ComplexFloat:
80558055
case clang::APValue::ComplexInt:
8056-
case clang::APValue::FixedPoint:
80578056
case clang::APValue::LValue:
80588057
case clang::APValue::MemberPointer:
80598058
case clang::APValue::Struct:

branches/master-next/lib/Frontend/CompilerInvocation.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -429,11 +429,7 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
429429
Opts.EnableSILOpaqueValues |= Args.hasArg(OPT_enable_sil_opaque_values);
430430

431431
#if SWIFT_DARWIN_ENABLE_STABLE_ABI_BIT
432-
Opts.UseDarwinPreStableABIBit =
433-
(Target.isMacOSX() && Target.isMacOSXVersionLT(10, 14, 4)) ||
434-
(Target.isiOS() && Target.isOSVersionLT(12, 2)) ||
435-
(Target.isTvOS() && Target.isOSVersionLT(12, 2)) ||
436-
(Target.isWatchOS() && Target.isOSVersionLT(5, 2));
432+
Opts.UseDarwinPreStableABIBit = false;
437433
#else
438434
Opts.UseDarwinPreStableABIBit = true;
439435
#endif

branches/master-next/lib/IRGen/GenCall.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1609,7 +1609,7 @@ llvm::CallSite CallEmission::emitCallSite() {
16091609
{ opaqueCallee });
16101610
opaqueCallee =
16111611
IGF.Builder.CreateBitCast(opaqueCallee, origCallee->getType());
1612-
call->setCalledFunction(fn.getFunctionType(), opaqueCallee);
1612+
call->setCalledFunction(opaqueCallee);
16131613

16141614
// Reset the insert point to after the call.
16151615
IGF.Builder.SetInsertPoint(call->getParent());

branches/master-next/lib/IRGen/GenDecl.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include "llvm/IR/GlobalAlias.h"
4242
#include "llvm/IR/InlineAsm.h"
4343
#include "llvm/IR/Module.h"
44+
#include "llvm/IR/TypeBuilder.h"
4445
#include "llvm/IR/Value.h"
4546
#include "llvm/Support/Compiler.h"
4647
#include "llvm/Support/ConvertUTF.h"
@@ -4081,10 +4082,7 @@ IRGenModule::getOrCreateHelperFunction(StringRef fnName, llvm::Type *resultTy,
40814082
llvm::FunctionType *fnTy =
40824083
llvm::FunctionType::get(resultTy, paramTys, false);
40834084

4084-
llvm::Constant *fn =
4085-
cast<llvm::Function>(Module.getOrInsertFunction(fnName, fnTy)
4086-
.getCallee()
4087-
->stripPointerCasts());
4085+
llvm::Constant *fn = Module.getOrInsertFunction(fnName, fnTy);
40884086

40894087
if (llvm::Function *def = shouldDefineHelper(*this, fn, setIsNoInline)) {
40904088
IRGenFunction IGF(*this, def);

branches/master-next/lib/IRGen/GenExistential.cpp

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -842,11 +842,8 @@ class OpaqueExistentialTypeInfo final :
842842
// Use copy-on-write existentials?
843843
auto fn = getAssignBoxedOpaqueExistentialBufferFunction(
844844
IGF.IGM, getLayout(), objPtrTy);
845-
auto destAddress = IGF.Builder.CreateBitCast(
846-
dest.getAddress(), cast<llvm::Function>(fn)->arg_begin()[0].getType());
847-
auto srcAddress = IGF.Builder.CreateBitCast(
848-
src.getAddress(), cast<llvm::Function>(fn)->arg_begin()[1].getType());
849-
auto call = IGF.Builder.CreateCall(fn, {destAddress, srcAddress});
845+
auto call =
846+
IGF.Builder.CreateCall(fn, {dest.getAddress(), src.getAddress()});
850847
call->setCallingConv(IGF.IGM.DefaultCC);
851848
call->setDoesNotThrow();
852849
return;
@@ -906,10 +903,7 @@ class OpaqueExistentialTypeInfo final :
906903
// Use copy-on-write existentials?
907904
auto fn = getDestroyBoxedOpaqueExistentialBufferFunction(
908905
IGF.IGM, getLayout(), addr.getAddress()->getType());
909-
auto call = IGF.Builder.CreateCall(
910-
fn, {IGF.Builder.CreateBitCast(
911-
addr.getAddress(),
912-
cast<llvm::Function>(fn)->arg_begin()->getType())});
906+
auto call = IGF.Builder.CreateCall(fn, {addr.getAddress()});
913907
call->setCallingConv(IGF.IGM.DefaultCC);
914908
call->setDoesNotThrow();
915909
return;
@@ -2051,11 +2045,8 @@ Address irgen::emitAllocateBoxedOpaqueExistentialBuffer(
20512045
/// Call a function to handle the non-fixed case.
20522046
auto *allocateFun = getAllocateBoxedOpaqueExistentialBufferFunction(
20532047
IGF.IGM, existLayout, existentialContainer.getAddress()->getType());
2054-
auto *call = IGF.Builder.CreateCall(
2055-
allocateFun,
2056-
{IGF.Builder.CreateBitCast(
2057-
existentialContainer.getAddress(),
2058-
cast<llvm::Function>(allocateFun)->arg_begin()->getType())});
2048+
auto *call =
2049+
IGF.Builder.CreateCall(allocateFun, {existentialContainer.getAddress()});
20592050
call->setCallingConv(IGF.IGM.DefaultCC);
20602051
call->setDoesNotThrow();
20612052
auto addressOfValue = IGF.Builder.CreateBitCast(call, valuePointerType);

branches/master-next/lib/IRGen/GenKeyPath.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ emitKeyPathComponent(IRGenModule &IGM,
989989
fnName.append("keypath_get_selector_");
990990
fnName.append(selectorName);
991991
auto fn = cast<llvm::Function>(
992-
IGM.Module.getOrInsertFunction(fnName, fnTy).getCallee());
992+
IGM.Module.getOrInsertFunction(fnName, fnTy));
993993
if (fn->empty()) {
994994
fn->setLinkage(llvm::Function::PrivateLinkage);
995995
IRGenFunction subIGF(IGM, fn);

branches/master-next/lib/IRGen/IRGen.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@
7070
#include "llvm/Transforms/IPO/AlwaysInliner.h"
7171
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
7272
#include "llvm/Transforms/Instrumentation.h"
73-
#include "llvm/Transforms/Instrumentation/AddressSanitizer.h"
74-
#include "llvm/Transforms/Instrumentation/ThreadSanitizer.h"
7573
#include "llvm/Transforms/ObjCARC.h"
7674

7775
#include <thread>
@@ -127,12 +125,12 @@ static void addSwiftMergeFunctionsPass(const PassManagerBuilder &Builder,
127125
static void addAddressSanitizerPasses(const PassManagerBuilder &Builder,
128126
legacy::PassManagerBase &PM) {
129127
PM.add(createAddressSanitizerFunctionPass());
130-
PM.add(createModuleAddressSanitizerLegacyPassPass());
128+
PM.add(createAddressSanitizerModulePass());
131129
}
132130

133131
static void addThreadSanitizerPass(const PassManagerBuilder &Builder,
134132
legacy::PassManagerBase &PM) {
135-
PM.add(createThreadSanitizerLegacyPassPass());
133+
PM.add(createThreadSanitizerPass());
136134
}
137135

138136
static void addSanitizerCoveragePass(const PassManagerBuilder &Builder,

branches/master-next/lib/IRGen/IRGenModule.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -571,8 +571,7 @@ llvm::Constant *swift::getRuntimeFn(llvm::Module &Module,
571571
{argTypes.begin(), argTypes.end()},
572572
/*isVararg*/ false);
573573

574-
cache =
575-
cast<llvm::Function>(Module.getOrInsertFunction(name, fnTy).getCallee());
574+
cache = Module.getOrInsertFunction(name, fnTy);
576575

577576
// Add any function attributes and set the calling convention.
578577
if (auto fn = dyn_cast<llvm::Function>(cache)) {
@@ -962,9 +961,8 @@ void IRGenModule::addLinkLibrary(const LinkLibrary &linkLib) {
962961
if (linkLib.shouldForceLoad()) {
963962
llvm::SmallString<64> buf;
964963
encodeForceLoadSymbolName(buf, linkLib.getName());
965-
auto ForceImportThunk = cast<llvm::Function>(
966-
Module.getOrInsertFunction(buf, llvm::FunctionType::get(VoidTy, false))
967-
.getCallee());
964+
auto ForceImportThunk =
965+
Module.getOrInsertFunction(buf, llvm::FunctionType::get(VoidTy, false));
968966
ApplyIRLinkage(IRLinkage::ExternalImport)
969967
.to(cast<llvm::GlobalValue>(ForceImportThunk));
970968

branches/master-next/lib/LLVMPasses/ARCEntryPointBuilder.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,9 @@ class ARCEntryPointBuilder {
260260
auto AttrList = AttributeList::get(M.getContext(), 1, Attribute::NoCapture);
261261
AttrList = AttrList.addAttribute(
262262
M.getContext(), AttributeList::FunctionIndex, Attribute::NoUnwind);
263-
CheckUnowned = cast<llvm::Function>(
264-
M.getOrInsertFunction("swift_checkUnowned", AttrList,
265-
Type::getVoidTy(M.getContext()), ObjectPtrTy)
266-
.getCallee());
263+
CheckUnowned = M.getOrInsertFunction("swift_checkUnowned", AttrList,
264+
Type::getVoidTy(M.getContext()),
265+
ObjectPtrTy);
267266
if (llvm::Triple(M.getTargetTriple()).isOSBinFormatCOFF() &&
268267
!llvm::Triple(M.getTargetTriple()).isOSCygMing())
269268
if (auto *F = llvm::dyn_cast<llvm::Function>(CheckUnowned.get()))

0 commit comments

Comments
 (0)