HomePhabricator

Introduce Value::stripPointerCastsSameRepresentation

Description

Introduce Value::stripPointerCastsSameRepresentation

This patch allows current users of Value::stripPointerCasts() to force
the result of the function to have the same representation as the value
it was called on. This is useful in various cases, e.g., (non-)null
checks.

In this patch only a single call site was adjusted to fix an existing
misuse that would cause nonnull where they may be wrong. Uses in
attribute deduction and other areas, e.g., D60047, are to be expected.

For a discussion on this topic, please see [0].

[0] http://lists.llvm.org/pipermail/llvm-dev/2018-December/128423.html

Reviewers: hfinkel, arsenm, reames

Subscribers: wdng, hiraditya, bollu, llvm-commits

Tags: #llvm

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

Details

Committed
jdoerfertJun 4 2019, 1:21 PM
Differential Revision
D61607: Introduce Value::stripPointerCastsSameRepresentation
Parents
rL362544: [Target] Remove Process::GetCPPLanguageRuntime
Branches
Unknown
Tags
Unknown