Is RegionInfoBase meant to be subclassed?

Hey all,

I’m trying to use LLVM’s graph utilities to do some graph-related work on some of my own classes. More precisely, I’m interested in getting regions.

RegionInfoBase has a number of important private fields and methods: the dominator tree, post-dominator tree, dominance frontier fields are all private, as is the constructor and the destructor. The two known concrete subclasses of RegionInfo are friended, and access these members directly. It seems to me that this makes subclassing impossible, even as I don’t see any reason that the algorithms wouldn’t work (though I could be mistaken).

There are ways to go around the access levels on most class members, but I can’t think of anything for the constructor and destructor that won’t upset the compiler. Short of #defining MachinRegionInfo to my class’s name (which probably violates ODR?), is there anything that I can do? Otherwise, would it be acceptable to make these members protected in LLVM?