[all-commits] [llvm/llvm-project] fe4316: Creating a named struct requires only a Context an...

nlewycky via All-commits all-commits at lists.llvm.org
Mon Nov 30 11:40:24 PST 2020


  Branch: refs/heads/temp-test-main
  Home:   https://github.com/llvm/llvm-project
  Commit: fe431683484a3041e024ab2373bb707b1ca8d1cf
      https://github.com/llvm/llvm-project/commit/fe431683484a3041e024ab2373bb707b1ca8d1cf
  Author: Nick Lewycky <nicholas at mxc.ca>
  Date:   2020-11-30 (Mon, 30 Nov 2020)

  Changed paths:
    M llvm/include/llvm-c/Core.h
    M llvm/include/llvm/IR/DerivedTypes.h
    M llvm/include/llvm/IR/Module.h
    M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
    M llvm/lib/IR/Core.cpp
    M llvm/lib/IR/Type.cpp
    M llvm/lib/Linker/IRMover.cpp
    M llvm/tools/llvm-c-test/echo.cpp
    M llvm/unittests/Analysis/TargetLibraryInfoTest.cpp
    M polly/lib/CodeGen/LoopGeneratorsKMP.cpp

  Log Message:
  -----------
  Creating a named struct requires only a Context and a name, but looking up a struct by name requires a Module. The method on Module merely accesses the LLVMContextImpl and no data from the module itself, so this patch moves getTypeByName to a static method on StructType that takes a Context and a name.

There's a small number of users of this function, they are all updated.

This updates the C API adding a new method LLVMGetTypeByName2 that takes a context and a name.

Differential Revision: https://reviews.llvm.org/D78793




More information about the All-commits mailing list