mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
d640962656
Add a new subclass of `UniquableMDNode`, `MDLocation`. This will be the IR version of `DebugLoc` and `DILocation`. The goal is to rename this to `DILocation` once the IR classes supersede the `DI`-prefixed wrappers. This isn't used anywhere yet. Part of PR21433. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225824 91177308-0d34-0410-b5e6-96231b3b80d8
60 lines
1.9 KiB
C++
60 lines
1.9 KiB
C++
//===- llvm/Metadata.def - Metadata definitions -----------------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Macros for running through all types of metadata.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#if !(defined HANDLE_METADATA || defined HANDLE_METADATA_LEAF || \
|
|
defined HANDLE_METADATA_BRANCH || defined HANDLE_UNIQUABLE_LEAF || \
|
|
defined HANDLE_UNIQUABLE_BRANCH)
|
|
#error "Missing macro definition of HANDLE_METADATA*"
|
|
#endif
|
|
|
|
// Handler for all types of metadata.
|
|
#ifndef HANDLE_METADATA
|
|
#define HANDLE_METADATA(CLASS)
|
|
#endif
|
|
|
|
// Handler for leaf nodes in the class hierarchy.
|
|
#ifndef HANDLE_METADATA_LEAF
|
|
#define HANDLE_METADATA_LEAF(CLASS) HANDLE_METADATA(CLASS)
|
|
#endif
|
|
|
|
// Handler for non-leaf nodes in the class hierarchy.
|
|
#ifndef HANDLE_METADATA_BRANCH
|
|
#define HANDLE_METADATA_BRANCH(CLASS) HANDLE_METADATA(CLASS)
|
|
#endif
|
|
|
|
// Handler for leaf nodes under UniquableMDNode.
|
|
#ifndef HANDLE_UNIQUABLE_LEAF
|
|
#define HANDLE_UNIQUABLE_LEAF(CLASS) HANDLE_METADATA_LEAF(CLASS)
|
|
#endif
|
|
|
|
// Handler for non-leaf nodes under UniquableMDNode.
|
|
#ifndef HANDLE_UNIQUABLE_BRANCH
|
|
#define HANDLE_UNIQUABLE_BRANCH(CLASS) HANDLE_METADATA_BRANCH(CLASS)
|
|
#endif
|
|
|
|
HANDLE_METADATA_LEAF(MDString)
|
|
HANDLE_METADATA_BRANCH(ValueAsMetadata)
|
|
HANDLE_METADATA_LEAF(ConstantAsMetadata)
|
|
HANDLE_METADATA_LEAF(LocalAsMetadata)
|
|
HANDLE_METADATA_BRANCH(MDNode)
|
|
HANDLE_METADATA_LEAF(MDNodeFwdDecl)
|
|
HANDLE_UNIQUABLE_BRANCH(UniquableMDNode)
|
|
HANDLE_UNIQUABLE_LEAF(MDTuple)
|
|
HANDLE_UNIQUABLE_LEAF(MDLocation)
|
|
|
|
#undef HANDLE_METADATA
|
|
#undef HANDLE_METADATA_LEAF
|
|
#undef HANDLE_METADATA_BRANCH
|
|
#undef HANDLE_UNIQUABLE_LEAF
|
|
#undef HANDLE_UNIQUABLE_BRANCH
|