[all-commits] [llvm/llvm-project] f20595: [BuildLibCalls] Use getPtrTy instead of getInt8PtrTy

Björn Pettersson via All-commits all-commits at lists.llvm.org
Wed Nov 15 12:17:10 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f205950e5ca6dc98ce839af9e7ab0ffe767dbe55
      https://github.com/llvm/llvm-project/commit/f205950e5ca6dc98ce839af9e7ab0ffe767dbe55
  Author: Bjorn Pettersson <bjorn.a.pettersson at ericsson.com>
  Date:   2023-11-15 (Wed, 15 Nov 2023)

  Changed paths:
    M llvm/lib/Transforms/Utils/BuildLibCalls.cpp

  Log Message:
  -----------
  [BuildLibCalls] Use getPtrTy instead of getInt8PtrTy

Stop using getInt8PtrTy() when referring to char* types when
building libcalls. As in many other files we can simply use
getPtrTy() instead, as part of transition into opaque pointers.

This patch is using thing like
  Type *CharPtrTy = B.getPtrTy();
  Type *VoidPtrTy = B.getPtrTy();
in several places, to give the pointer type a name.
The idea is to make the mapping to the libc function prototypes clear.




More information about the All-commits mailing list