Skip to content

[Bug]: Malformed mangled symbol name #753

@kumarak

Description

@kumarak

VAST version

tag: v0.0.33

LLVM version

18.1.4

Operating system

macOS

Description

The symbol name of function is getting malformed and starts with \01. This is how the generated hl representation looks like:

  hl.func @"\01measure_hemoglobin" external () -> !hl.int< unsigned > attributes {hl.asm = #hl.asm<"measure_hemoglobin", true>, sym_visibility = "private"}
    hl.func @"\01measure_oxygen" external () -> !hl.int< unsigned > attributes {hl.asm = #hl.asm<"measure_oxygen", true>, sym_visibility = "private"}
    hl.func @"\01init_mmio" external (!hl.lvalue<!hl.ptr<!hl.int< unsigned >>>, !hl.lvalue<!hl.ptr<!hl.int< unsigned >>>, !hl.lvalue<!hl.ptr<!hl.int< unsigned >>>) -> !hl.void attributes {hl.asm = #hl.asm<"init_mmio", true>, sym_visibility = "private"}
    hl.func @"\01main" external () -> !hl.int< unsigned > attributes {hl.asm = #hl.asm<"main", true>} {
      %0 = hl.label.decl @ram_00101140_0_basic : !hl.label
      hl.var @iVar1  : !hl.lvalue<!hl.int< unsigned >>
      hl.var @iVar2  : !hl.lvalue<!hl.int< unsigned >>
      hl.goto %0
      hl.label %0 {
        ....

lifted.c.gz

Steps to Reproduce

vast-front -vast-emit-mlir=hl /tmp/lifted.c -o /tmp/lifted.c.mlir

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions