OSDN Git Service

Added a version of User::new for hung off uses.
authorPete Cooper <peter_cooper@apple.com>
Fri, 12 Jun 2015 17:48:14 +0000 (17:48 +0000)
committerPete Cooper <peter_cooper@apple.com>
Fri, 12 Jun 2015 17:48:14 +0000 (17:48 +0000)
commit8b351e404045f00878987ae9996913dc4c530ec4
tree4b2262497479de894bd83c043b2a14d2c9b3dbbf
parentaaa3fa61d2d2107095f90648249ffb2f6f7099ca
Added a version of User::new for hung off uses.

There are now 2 versions of User::new.  The first takes a size_t and is the current
implementation for subclasses which need 0 or more Use's allocated for their operands.

The new version takes no extra arguments to say that this subclass needs 'hung off uses'.
The HungOffUses bool is now set in this version of User::new and we can assert in
allocHungOffUses that we are allowed to have hung off uses.
This ensures we call the correct version of User::new for subclasses which need hung off uses.

A future commit will then allocate space for a single Use* which will be used
in place of User::OperandList once that field has been removed.

Reviewed by Duncan Exon Smith.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239622 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Instructions.h
include/llvm/IR/User.h
lib/IR/User.cpp