mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-08 03:30:22 +00:00
5e5dfa307a
function in the one .cpp file that uses it. Use ValueSet's instead. * Prepare to delete LiveVarSet.h & LiveVarSet.cpp * Eliminate the ValueSet class, making all old member functions into global templates that will eventually be moved to Support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1711 91177308-0d34-0410-b5e6-96231b3b80d8
23 lines
536 B
C++
23 lines
536 B
C++
|
|
|
|
|
|
#include "llvm/Analysis/LiveVar/ValueSet.h"
|
|
#include "llvm/ConstantVals.h"
|
|
#include <iostream>
|
|
|
|
ostream &operator<<(ostream &O, RAV V) { // func to print a Value
|
|
const Value *v = V.V;
|
|
if (v->hasName())
|
|
return O << v << "(" << v->getName() << ") ";
|
|
else if (Constant *C = dyn_cast<Constant>(v))
|
|
return O << v << "(" << C->getStrValue() << ") ";
|
|
else
|
|
return O << v << " ";
|
|
}
|
|
|
|
void printSet(const ValueSet &S) {
|
|
for (ValueSet::const_iterator I = S.begin(), E = S.end(); I != E; ++I)
|
|
std::cerr << RAV(*I);
|
|
}
|
|
|