[all-commits] [llvm/llvm-project] c2c259: const char* for LLVMTargetMachineEmitToFile's argu...

deadalnix via All-commits all-commits at lists.llvm.org
Sat May 7 07:41:07 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c2c259224bb30b089206dd69dc44aefddffec2f4
      https://github.com/llvm/llvm-project/commit/c2c259224bb30b089206dd69dc44aefddffec2f4
  Author: Amaury S├ęchet <deadalnix at gmail.com>
  Date:   2022-05-07 (Sat, 07 May 2022)

  Changed paths:
    M llvm/include/llvm-c/TargetMachine.h
    M llvm/lib/Target/TargetMachineC.cpp

  Log Message:
  -----------
  const char* for LLVMTargetMachineEmitToFile's argument

The `LLVMTargetMachineEmitToFile` takes a `char* Filename` right now, but it doesn't modify it.
This is annoying to use in the case where you want to pass a const string, because you either have to remove the const, or copy it somewhere else and pass that. Either way, it's not very nice.

I added a const and clang formatted it. This shouldn't break any ABI in my opinion.
I'm sorry but I didn't know whom to put as reviewer for this, so I chose someone with a lot of commits from the .cpp file.

Reviewed By: deadalnix

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




More information about the All-commits mailing list