From 90fa80d597c282db06fe3c052222590f40f501b1 Mon Sep 17 00:00:00 2001 From: Philip Reames Date: Wed, 2 Sep 2015 22:30:53 +0000 Subject: [PATCH] [RewriteStatepointsForGC] Pull a function out of anon namespace [NFC] Thanks to David Blaikie for noticing in previous commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246721 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index 7563cea9a04..929a4eb3968 100644 --- a/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp @@ -615,14 +615,16 @@ private: Status status; Value *base; // non null only if status == base }; +} #ifndef NDEBUG -inline raw_ostream &operator<<(raw_ostream &OS, const BDVState &State) { +static raw_ostream &operator<<(raw_ostream &OS, const BDVState &State) { State.print(OS); return OS; } #endif +namespace { typedef DenseMap ConflictStateMapTy; // Values of type BDVState form a lattice, and this is a helper // class that implementes the meet operation. The meat of the meet @@ -680,6 +682,8 @@ private: } }; } + + /// For a given value or instruction, figure out what base ptr it's derived /// from. For gc objects, this is simply itself. On success, returns a value /// which is the base pointer. (This is reliable and can be used for -- 2.34.1