[all-commits] [llvm/llvm-project] 6f4f4f: [remark][diagnostics] [codegen] Fix PR44896

xur-llvm via All-commits all-commits at lists.llvm.org
Wed Feb 26 02:58:47 PST 2020


  Branch: refs/heads/release/10.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 6f4f4f2c8ce1ad17bdec9fe2071d3fe439eca9eb
      https://github.com/llvm/llvm-project/commit/6f4f4f2c8ce1ad17bdec9fe2071d3fe439eca9eb
  Author: Rong Xu <xur at google.com>
  Date:   2020-02-26 (Wed, 26 Feb 2020)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticDriverKinds.td
    M clang/lib/CodeGen/CodeGenAction.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    A clang/test/CodeGen/PR44896.ll

  Log Message:
  -----------
  [remark][diagnostics] [codegen] Fix PR44896

This patch fixes PR44896. For IR input files, option fdiscard-value-names
should be ignored as we need named values in loadModule().
Commit 60d3947922 sets this option after loadModule() where valued names
already created. This creates an inconsistent state in setNameImpl()
that leads to a seg fault.
This patch forces fdiscard-value-names to be false for IR input files.

This patch also emits a warning of "ignoring -fdiscard-value-names" if
option fdiscard-value-names is explictly enabled in the commandline for
IR input files.

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

(cherry picked from commit 11857d49948b845dcfd7c7f78595095e3add012d)




More information about the All-commits mailing list