Skip to content

can't add global type definitions to module #674

Open
@bpmason1

Description

@bpmason1

After creating a structure type using LiteralStructType how can I add that type definition to my module.

As an example, for the C code:

typedef struct{
  int height;
  int width;
} Rect;

clang emits llvm IR

%struct.Rect = type { i32, i32 }

The %struct.Rect is later used as the type argument to getelementptr when the type is used within functions,

From the documentation there doesn't appear to be a way to append a global type definition to the llvmlite module in this way.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions