Menu

- Learn
- Documentation
  - Language Reference
  - Library Reference
  - Command-line Reference
  - Feature Overview
  - Articles
- Downloads
- Packages
- Community
  - Blog
  - Orgs using D
  - Twitter
  - Forums
  - IRC
  - Wiki
  - GitHub
  - Issues
  - Get involved
  - Contributors
  - Foundation
  - Donate
- Resources
  - Books
  - Tutorials
  - Tools
  - Editors
  - IDEs
  - Visual D
  - Acknowledgments
  - D Style
  - Glossary
  - Sitemap

Search
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

# dmd.target

Compiler implementation of the D programming language.
Authors:
Walter Bright
License:
Boost License 1.0

Source: target.d

struct `Target`;
  static uint `alignsize`(Type `type`);
    Return memory alignment size of `type`.
  static uint `fieldalign`(Type `type`);
    Return field alignment size of `type`.
  static uint `critsecsize`();
    Return size of OS critical section.

    NOTE: can't use the sizeof() calls directly since cross compiling is supported and would end up using the host sizes rather than the target sizes.

  static Type `va_listType`();
    Returns a Type for the va_list type of the target.

    NOTE: For Posix/x86_64 this returns the type which will really be used for passing an argument of type va_list.

  static int `isVectorTypeSupported`(int `sz`, Type `type`);
    Checks whether the target supports a vector `type` with total size `sz` (in bytes) and element `type` `type`.
    Returns:
    0 if the `type` is supported, or else: 1 if vector types are not supported on the target at all, 2 if the element `type` isn't, or 3 if the given size isn't.
  static bool `isVectorOpSupported`(Type `type`, TOK `op`, Type `t2` = null);
    Checks whether the target supports operation `op` for vectors of `type` `type`. For binary ops `t2` is the `type` of the 2nd operand.
    Returns:
    `true` if the operation is supported or `type` is not a vector
  static Expression `paintAsType`(Expression `e`, Type `type`);
    Encode the given expression, which is assumed to be an rvalue literal as another `type` for use in CTFE. This corresponds roughly to the idiom *(Type *)&`e`.
  static void `loadModule`(Module `m`);
    For the given module, perform any post parsing analysis. Certain compiler backends (ie: GDC) have special placeholder modules whose source are empty, but code gets injected immediately after loading.
  static void `prefixName`(OutBuffer* `buf`, LINK `linkage`);
    For the given symbol written to the OutBuffer, apply any target-specific prefixes based on the given `linkage`.
  static const(char)* `cppTypeMangle`(Type `t`);
    For a vendor-specific type, return a string containing the C++ mangling. In all other cases, return `null`.
  static LINK `systemLinkage`();
    Return the default system linkage for the target.

Copyright © 1999-2018 by the D Language Foundation | Page generated by Ddoc on Wed Feb 7 19:52:39 2018