Skip to content

Commit fea8abd

Browse files
authored
---
yaml --- r: 274397 b: refs/heads/master-next c: bb0f0c8 h: refs/heads/master i: 274395: 0719e10
1 parent df5d8aa commit fea8abd

File tree

14 files changed

+31
-47
lines changed

14 files changed

+31
-47
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: cbef630f19f869ab5279731179bd731f12b3b9d5
3-
refs/heads/master-next: 1330ab0232d776c771b9591ca6b09aba4b121a51
3+
refs/heads/master-next: bb0f0c8397d066900c92ede9b4129ebacbb940d7
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/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/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/ImportDecl.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8055,7 +8055,6 @@ ClangImporter::Implementation::createConstant(Identifier name, DeclContext *dc,
80558055
case clang::APValue::Array:
80568056
case clang::APValue::ComplexFloat:
80578057
case clang::APValue::ComplexInt:
8058-
case clang::APValue::FixedPoint:
80598058
case clang::APValue::LValue:
80608059
case clang::APValue::MemberPointer:
80618060
case clang::APValue::Struct:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1599,7 +1599,7 @@ llvm::CallSite CallEmission::emitCallSite() {
15991599
{ opaqueCallee });
16001600
opaqueCallee =
16011601
IGF.Builder.CreateBitCast(opaqueCallee, origCallee->getType());
1602-
call->setCalledFunction(fn.getFunctionType(), opaqueCallee);
1602+
call->setCalledFunction(opaqueCallee);
16031603

16041604
// Reset the insert point to after the call.
16051605
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()))

branches/master-next/lib/LLVMPasses/LLVMSwiftAA.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,17 @@ static ModRefInfo getConservativeModRefForKind(const llvm::Instruction &I) {
3232
llvm_unreachable("Not a valid Instruction.");
3333
}
3434

35-
ModRefInfo SwiftAAResult::getModRefInfo(const llvm::CallBase *Call,
35+
ModRefInfo SwiftAAResult::getModRefInfo(llvm::ImmutableCallSite CS,
3636
const llvm::MemoryLocation &Loc) {
3737
// We know at compile time that certain entry points do not modify any
3838
// compiler-visible state ever. Quickly check if we have one of those
3939
// instructions and return if so.
40-
if (ModRefInfo::NoModRef == getConservativeModRefForKind(*Call))
40+
if (ModRefInfo::NoModRef ==
41+
getConservativeModRefForKind(*CS.getInstruction()))
4142
return ModRefInfo::NoModRef;
4243

4344
// Otherwise, delegate to the rest of the AA ModRefInfo machinery.
44-
return AAResultBase::getModRefInfo(Call, Loc);
45+
return AAResultBase::getModRefInfo(CS, Loc);
4546
}
4647

4748
//===----------------------------------------------------------------------===//

branches/master-next/validation-test/SIL/verify_all_overlays.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/usr/bin/python
22
# RUN: ${python} %s %target-swiftmodule-name %platform-sdk-overlay-dir \
3-
# RUN: %target-sil-opt -sdk %sdk -enable-sil-verify-all \
4-
# RUN: -F "%xcode-extra-frameworks-dir"
3+
# RUN: %target-sil-opt -sdk %sdk -enable-sil-verify-all \
4+
# RUN: -Fsystem %sdk/System/Library/PrivateFrameworks \
5+
# RUN: -F "%xcode-extra-frameworks-dir"
56

67
# REQUIRES: long_test
78
# REQUIRES: nonexecutable_test

0 commit comments

Comments
 (0)