mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-12 13:55:57 +03:00

Compiling the rt.util.typeinfo unittests leads to base-typed forward declarations of built-in TypeInfos colliding with the init symbols for their TypeInfo_* classes in rt.util.typeinfo. We've already had a workaround for this in one place (typinf.cpp); extend it to the other side as well (iraggr.cpp). Also make sure to emit the TypeInfo metadata even if the IR symbol already exists as init symbol. And finally, keep init symbols of built-in TypeInfo classes mutable just like any other TypeInfo, so that e.g. synchronized() can be used on the implicit monitor.
22 lines
679 B
C++
22 lines
679 B
C++
//===-- gen/linkage.h - Common linkage types --------------------*- C++ -*-===//
|
||
//
|
||
// LDC – the LLVM D compiler
|
||
//
|
||
// This file is distributed under the BSD-style LDC license. See the LICENSE
|
||
// file for details.
|
||
//
|
||
//===----------------------------------------------------------------------===//
|
||
//
|
||
// Linkage types used for certain constructs (templates, TypeInfo).
|
||
//
|
||
//===----------------------------------------------------------------------===//
|
||
|
||
#pragma once
|
||
|
||
#include "gen/llvm.h"
|
||
|
||
// Make it easier to test new linkage types
|
||
|
||
#define TYPEINFO_LINKAGE_TYPE LLGlobalValue::LinkOnceODRLinkage
|
||
|
||
extern LLGlobalValue::LinkageTypes templateLinkage;
|