[all-commits] [llvm/llvm-project] c30d8f: [IR] Set name when inserting 'llvm::Value*'

Brian Gesiak via All-commits all-commits at lists.llvm.org
Tue Feb 18 05:22:13 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c30d8f7c910d9ddcaf8cab1ebea4b202bc88fcf9
      https://github.com/llvm/llvm-project/commit/c30d8f7c910d9ddcaf8cab1ebea4b202bc88fcf9
  Author: Brian Gesiak <modocache at gmail.com>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M llvm/include/llvm/IR/IRBuilder.h
    M llvm/unittests/IR/IRBuilderTest.cpp

  Log Message:
  -----------
  [IR] Set name when inserting 'llvm::Value*'

Summary:
I noticed a small regression in a toy project of mine after applying
D73835, in which instruction names weren't being set properly. In the
example test case included with this patch,
`llvm::IRBuilderBase::CreateAdd` returns an `llvm::Value *` that is then
passed as an argument to `llvm::IRBuilderBase::Insert`. The overloaded
function that is selected for that call then ignores the `Name`
parameter that is given. This patch addresses that issue.

Reviewers: nikic, Meinersbur, nhaehnle, fhahn, thakis, teemperor

Reviewed By: nikic, fhahn

Subscribers: llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list