[MachineOutliner][NFC] Move decrement logic to OutlinedFunction
authorJessica Paquette <jpaquette@apple.com>
Tue, 17 Oct 2017 19:03:23 +0000 (19:03 +0000)
committerJessica Paquette <jpaquette@apple.com>
Tue, 17 Oct 2017 19:03:23 +0000 (19:03 +0000)
commit85af63d0448cfac7d4824dd054b64cdf2cdc6080
treef27f4d4c30d41acf794e3729f306d0f9091e3469
parentc9ab4c263422a86a77da0d2b4dbcc2e56ff540dc
[MachineOutliner][NFC] Move decrement logic to OutlinedFunction

This commit moves the decrement logic for outlined functions into the class,
and makes OccurrenceCount private. It can now be accessed via
getOccurrenceCount().

This makes it more difficult to accidentally introduce bugs by incorrectly
decrementing the occurrence count on OutlinedFunctions.

llvm-svn: 316020
llvm/lib/CodeGen/MachineOutliner.cpp