Just identify it. After defining the class, but until the end of the anonymous namespace, add this line:
DenseMap<Function*, DenseMap<Instruction*,Invariant*> > Invariant::Invariants;
This will create a static member in each translation unit that includes this title (which is good because it is in an anonymous namespace that is unique to each translation unit). This is probably not what you want, but it follows from the definition of Invariant in the anonymous namespace. If you use a named namespace instead, you can put the Invariants definition in the source file and have only one object common to all the code.
Pete becker
source share