Skip to main content

codeview_annotation

Function codeview_annotation 

Source
pub fn codeview_annotation<T: CodeViewAnnotationArgs>()
🔬This is a nightly-only experimental API. (codeview_annotation #163964)
Available on Windows only.
Expand description

Writes T::ARGS to the PDB as an S_ANNOTATION record using llvm.codeview.annotation.

This function has an effect only on the msvc environment and the LLVM backend. It is a no-op on other environments and backends.

§Examples

To call codeview_annotation, the caller must declare a type implementing CodeViewAnnotationArgs and pass it as the type parameter to codeview_annotation. The string arguments must be specified in CodeViewAnnotationArgs::ARGS.

ⓘ
#![feature(codeview_annotation, core_os)]
use core::os::windows::{codeview_annotation, CodeViewAnnotationArgs};

struct Args;

impl CodeViewAnnotationArgs for Args {
    const ARGS: &[&str] = &["Hello", "World"];
}

codeview_annotation::<Args>();