mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge remote-tracking branch 'origin/main' into rebranch
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user