ldc/gen/typinf.h
2024-03-03 19:14:00 +01:00

30 lines
958 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//===-- gen/typinf.h - TypeInfo declaration codegen -------------*- C++ -*-===//
//
// LDC the LLVM D compiler
//
// This file is distributed under the BSD-style LDC license. See the LICENSE
// file for details.
//
//===----------------------------------------------------------------------===//
//
// Codegen for the TypeInfo types/constants required by the D run-time type
// information system.
//
//===----------------------------------------------------------------------===//
#pragma once
struct Loc;
class Type;
class TypeInfoDeclaration;
namespace llvm {
class GlobalVariable;
}
TypeInfoDeclaration *getOrCreateTypeInfoDeclaration(const Loc &loc,
Type *forType);
llvm::GlobalVariable *DtoResolveTypeInfo(TypeInfoDeclaration *tid);
// Adds some metadata for use by optimization passes.
void emitTypeInfoMetadata(llvm::GlobalVariable *typeinfoGlobal, Type *forType);