mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Mangling: use macros instead of hard-coded swift symbol names.
This makes it easier to switch between the old and new mangling scheme.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "swift/AST/DiagnosticsIRGen.h"
|
||||
#include "swift/AST/IRGenOptions.h"
|
||||
#include "swift/Basic/Dwarf.h"
|
||||
#include "swift/Basic/ManglingMacros.h"
|
||||
#include "swift/ClangImporter/ClangImporter.h"
|
||||
#include "swift/Runtime/RuntimeFnWrappersGen.h"
|
||||
#include "swift/Runtime/Config.h"
|
||||
@@ -642,8 +643,9 @@ llvm::Constant *IRGenModule::getEmptyTupleMetadata() {
|
||||
if (EmptyTupleMetadata)
|
||||
return EmptyTupleMetadata;
|
||||
|
||||
EmptyTupleMetadata =
|
||||
Module.getOrInsertGlobal("_TMT_", FullTypeMetadataStructTy);
|
||||
EmptyTupleMetadata = Module.getOrInsertGlobal(
|
||||
MANGLE_AS_STRING(METADATA_SYM(EMPTY_TUPLE_MANGLING)),
|
||||
FullTypeMetadataStructTy);
|
||||
if (Triple.isOSBinFormatCOFF())
|
||||
cast<llvm::GlobalVariable>(EmptyTupleMetadata)
|
||||
->setDLLStorageClass(llvm::GlobalValue::DLLImportStorageClass);
|
||||
|
||||
Reference in New Issue
Block a user