Merge remote-tracking branch 'origin/main' into rebranch

This commit is contained in:
swift-ci
2021-12-14 09:34:56 -08:00
21 changed files with 87 additions and 51 deletions

View File

@@ -995,13 +995,13 @@ void IRGenModule::registerRuntimeEffect(ArrayRef<RuntimeEffect> effect,
#include "swift/Runtime/RuntimeFunctions.def"
std::pair<llvm::GlobalVariable *, llvm::Constant *>
IRGenModule::createStringConstant(StringRef Str,
bool willBeRelativelyAddressed, StringRef sectionName) {
IRGenModule::createStringConstant(StringRef Str, bool willBeRelativelyAddressed,
StringRef sectionName, StringRef name) {
// If not, create it. This implicitly adds a trailing null.
auto init = llvm::ConstantDataArray::getString(getLLVMContext(), Str);
auto global = new llvm::GlobalVariable(Module, init->getType(), true,
llvm::GlobalValue::PrivateLinkage,
init);
init, name);
// FIXME: ld64 crashes resolving relative references to coalesceable symbols.
// rdar://problem/22674524
// If we intend to relatively address this string, don't mark it with