Skip to content

restype missing for all llvm APIs that return void #1088

Open
@yashssh

Description

Although this haven't caused any problems until now, it might lead to hidden hard to debug failures in the future. Few examples from the codebase that need fixing.

  • LLVMPY_PrintValueToString, LLVMPY_SetValueName, LLVMPY_SetLinkage, etc from ffi/value.cpp
  • LLVMPY_GetHostCPUName, LLVMPY_GetDefaultTargetTriple, etc from ffi/targets.cpp
  • Similarly many from passmanagers.cpp, newpassmanagers.cpp, transfroms.cpp

It seems like it's a practice in the codebase to not declare restype for llvm functions returning void.

If this is to be fixed a question I have is what should be the restype for these functions, None or c_int?

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