Skip to content

Commit 73960fb

Browse files
committed
---
yaml --- r: 275454 b: refs/heads/master-next c: 43fd0c5 h: refs/heads/master
1 parent b24a97c commit 73960fb

File tree

18 files changed

+51
-35
lines changed

18 files changed

+51
-35
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: 68cb52a35161f97604577d39f6f2dc2b190c38cd
3+
refs/heads/master-next: 43fd0c50a53ce6a59923c6ee691743407ae5bea7
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(llvm::ImmutableCallSite CS,
33+
llvm::ModRefInfo getModRefInfo(const llvm::CallBase *Call,
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(get_svn_script "${LLVM_MAIN_SRC_DIR}/cmake/modules/GetSVN.cmake")
33+
set(generate_vcs_version_script "${LLVM_MAIN_SRC_DIR}/cmake/modules/GenerateVersionFromVCS.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}" "${get_svn_script}"
42+
DEPENDS "${dep_file}" "${generate_vcs_version_script}"
4343
COMMAND
44-
${CMAKE_COMMAND} "-DFIRST_SOURCE_DIR=${dir}"
45-
"-DFIRST_NAME=${upper_name}"
44+
${CMAKE_COMMAND} "-DNAMES=${upper_name}"
45+
"-D${upper_name}_SOURCE_DIR=${dir}"
4646
"-DHEADER_FILE=${revision_inc}"
47-
-P "${get_svn_script}")
47+
-P "${generate_vcs_version_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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ 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:
145146
return "";
146147
case llvm::Triple::Darwin:
147148
case llvm::Triple::MacOSX:

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

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

10171016

10181017
// Create the associated action.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8053,6 +8053,7 @@ 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:
80568057
case clang::APValue::LValue:
80578058
case clang::APValue::MemberPointer:
80588059
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
@@ -1609,7 +1609,7 @@ llvm::CallSite CallEmission::emitCallSite() {
16091609
{ opaqueCallee });
16101610
opaqueCallee =
16111611
IGF.Builder.CreateBitCast(opaqueCallee, origCallee->getType());
1612-
call->setCalledFunction(opaqueCallee);
1612+
call->setCalledFunction(fn.getFunctionType(), 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: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
#include "llvm/IR/GlobalAlias.h"
4242
#include "llvm/IR/InlineAsm.h"
4343
#include "llvm/IR/Module.h"
44-
#include "llvm/IR/TypeBuilder.h"
4544
#include "llvm/IR/Value.h"
4645
#include "llvm/Support/Compiler.h"
4746
#include "llvm/Support/ConvertUTF.h"
@@ -4082,7 +4081,10 @@ IRGenModule::getOrCreateHelperFunction(StringRef fnName, llvm::Type *resultTy,
40824081
llvm::FunctionType *fnTy =
40834082
llvm::FunctionType::get(resultTy, paramTys, false);
40844083

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

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

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

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -842,8 +842,11 @@ class OpaqueExistentialTypeInfo final :
842842
// Use copy-on-write existentials?
843843
auto fn = getAssignBoxedOpaqueExistentialBufferFunction(
844844
IGF.IGM, getLayout(), objPtrTy);
845-
auto call =
846-
IGF.Builder.CreateCall(fn, {dest.getAddress(), src.getAddress()});
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});
847850
call->setCallingConv(IGF.IGM.DefaultCC);
848851
call->setDoesNotThrow();
849852
return;
@@ -903,7 +906,10 @@ class OpaqueExistentialTypeInfo final :
903906
// Use copy-on-write existentials?
904907
auto fn = getDestroyBoxedOpaqueExistentialBufferFunction(
905908
IGF.IGM, getLayout(), addr.getAddress()->getType());
906-
auto call = IGF.Builder.CreateCall(fn, {addr.getAddress()});
909+
auto call = IGF.Builder.CreateCall(
910+
fn, {IGF.Builder.CreateBitCast(
911+
addr.getAddress(),
912+
cast<llvm::Function>(fn)->arg_begin()->getType())});
907913
call->setCallingConv(IGF.IGM.DefaultCC);
908914
call->setDoesNotThrow();
909915
return;
@@ -2045,8 +2051,11 @@ Address irgen::emitAllocateBoxedOpaqueExistentialBuffer(
20452051
/// Call a function to handle the non-fixed case.
20462052
auto *allocateFun = getAllocateBoxedOpaqueExistentialBufferFunction(
20472053
IGF.IGM, existLayout, existentialContainer.getAddress()->getType());
2048-
auto *call =
2049-
IGF.Builder.CreateCall(allocateFun, {existentialContainer.getAddress()});
2054+
auto *call = IGF.Builder.CreateCall(
2055+
allocateFun,
2056+
{IGF.Builder.CreateBitCast(
2057+
existentialContainer.getAddress(),
2058+
cast<llvm::Function>(allocateFun)->arg_begin()->getType())});
20502059
call->setCallingConv(IGF.IGM.DefaultCC);
20512060
call->setDoesNotThrow();
20522061
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));
992+
IGM.Module.getOrInsertFunction(fnName, fnTy).getCallee());
993993
if (fn->empty()) {
994994
fn->setLinkage(llvm::Function::PrivateLinkage);
995995
IRGenFunction subIGF(IGM, fn);

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@
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"
7375
#include "llvm/Transforms/ObjCARC.h"
7476

7577
#include <thread>
@@ -125,12 +127,12 @@ static void addSwiftMergeFunctionsPass(const PassManagerBuilder &Builder,
125127
static void addAddressSanitizerPasses(const PassManagerBuilder &Builder,
126128
legacy::PassManagerBase &PM) {
127129
PM.add(createAddressSanitizerFunctionPass());
128-
PM.add(createAddressSanitizerModulePass());
130+
PM.add(createModuleAddressSanitizerLegacyPassPass());
129131
}
130132

131133
static void addThreadSanitizerPass(const PassManagerBuilder &Builder,
132134
legacy::PassManagerBase &PM) {
133-
PM.add(createThreadSanitizerPass());
135+
PM.add(createThreadSanitizerLegacyPassPass());
134136
}
135137

136138
static void addSanitizerCoveragePass(const PassManagerBuilder &Builder,

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

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

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

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

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,10 @@ 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 = M.getOrInsertFunction("swift_checkUnowned", AttrList,
264-
Type::getVoidTy(M.getContext()),
265-
ObjectPtrTy);
263+
CheckUnowned = cast<llvm::Function>(
264+
M.getOrInsertFunction("swift_checkUnowned", AttrList,
265+
Type::getVoidTy(M.getContext()), ObjectPtrTy)
266+
.getCallee());
266267
if (llvm::Triple(M.getTargetTriple()).isOSBinFormatCOFF() &&
267268
!llvm::Triple(M.getTargetTriple()).isOSCygMing())
268269
if (auto *F = llvm::dyn_cast<llvm::Function>(CheckUnowned.get()))

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

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

35-
ModRefInfo SwiftAAResult::getModRefInfo(llvm::ImmutableCallSite CS,
35+
ModRefInfo SwiftAAResult::getModRefInfo(const llvm::CallBase *Call,
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 ==
41-
getConservativeModRefForKind(*CS.getInstruction()))
40+
if (ModRefInfo::NoModRef == getConservativeModRefForKind(*Call))
4241
return ModRefInfo::NoModRef;
4342

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

4847
//===----------------------------------------------------------------------===//

branches/master-next/tools/driver/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ add_swift_tool_symlink(swift-format swift editor-integration)
3434

3535
# If building as part of clang, make sure the headers are installed.
3636
if(NOT SWIFT_BUILT_STANDALONE)
37-
add_dependencies(swift clang-headers)
37+
add_dependencies(swift clang-resource-headers)
3838
endif()
3939

4040
swift_install_in_component(compiler

branches/master-next/tools/swift-remoteast-test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ endif()
1313

1414
# If building as part of clang, make sure the headers are installed.
1515
if(NOT SWIFT_BUILT_STANDALONE)
16-
add_dependencies(swift clang-headers)
16+
add_dependencies(swift clang-resource-headers)
1717
endif()
1818

branches/master-next/utils/build-presets.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ install-xctest
744744
install-libicu
745745
install-prefix=/usr
746746
swift-install-components=autolink-driver;compiler;clang-resource-dir-symlink;stdlib;swift-remote-mirror;sdk-overlay;parser-lib;license;sourcekit-inproc
747-
llvm-install-components=llvm-cov;llvm-profdata;IndexStore;clang;clang-headers;compiler-rt;clangd
747+
llvm-install-components=llvm-cov;llvm-profdata;IndexStore;clang;clang-resource-headers;compiler-rt;clangd
748748
install-libcxx
749749
build-swift-static-stdlib
750750
build-swift-static-sdk-overlay
@@ -1133,7 +1133,7 @@ test-installable-package
11331133
reconfigure
11341134

11351135
swift-install-components=compiler;clang-resource-dir-symlink;stdlib;sdk-overlay;parser-lib;license;sourcekit-xpc-service;swift-remote-mirror;swift-remote-mirror-headers
1136-
llvm-install-components=llvm-cov;llvm-profdata;IndexStore;clang;clang-headers;compiler-rt;clangd
1136+
llvm-install-components=llvm-cov;llvm-profdata;IndexStore;clang;clang-resource-headers;compiler-rt;clangd
11371137
install-libcxx
11381138

11391139
# Path to the .tar.gz package we would create.

branches/master-next/utils/build-script-impl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2142,7 +2142,7 @@ for host in "${ALL_HOSTS[@]}"; do
21422142
if [ "${SKIP_BUILD_LLVM}" ] ; then
21432143
# We can't skip the build completely because the standalone
21442144
# build of Swift depend on these.
2145-
build_targets=(llvm-tblgen clang-headers intrinsics_gen clang-tablegen-targets)
2145+
build_targets=(llvm-tblgen clang-resource-headers intrinsics_gen clang-tablegen-targets)
21462146
fi
21472147

21482148
if [ "${HOST_LIBTOOL}" ] ; then

0 commit comments

Comments
 (0)