[PATCH] D74871: Fix interaction between -fdiscard-value-names and LLVM Bitcode

serge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 19 22:18:03 PST 2020


serge-sans-paille added a comment.

In D74871#1883884 <https://reviews.llvm.org/D74871#1883884>, @EricWF wrote:

> Why is this not a bug in w/e is handling the IR?


It may totally be. Consider this review as a way to start the discussion. The problem, as it appears, is triggered when some value is parsed in non-discard mode (which is the only valid mode when parsing IR (see https://github.com/llvm/llvm-project/blob/master/llvm/lib/AsmParser/LLParser.cpp#L71)) and then the Value is destroyed. Another working patch I've experimented with modifies `Value::setName` and still runs the function body in discard mode if the value actually has a name. Would you prefer that approach?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74871/new/

https://reviews.llvm.org/D74871





More information about the cfe-commits mailing list