mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-13 09:33:50 +00:00
Simplify and update code a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2376 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b9ddce65c2
commit
bfeec103e1
@ -2,17 +2,17 @@
|
||||
|
||||
|
||||
#include "llvm/Analysis/LiveVar/ValueSet.h"
|
||||
#include "llvm/ConstantVals.h"
|
||||
#include "llvm/Value.h"
|
||||
#include <iostream>
|
||||
|
||||
std::ostream &operator<<(std::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 << ") ";
|
||||
return O << (void*)v << "(" << v->getName() << ") ";
|
||||
else if (isa<Constant>(v))
|
||||
return O << (void*)v << "(" << v << ") ";
|
||||
else
|
||||
return O << v << " ";
|
||||
return O << (void*)v << " ";
|
||||
}
|
||||
|
||||
void printSet(const ValueSet &S) {
|
||||
|
@ -2,17 +2,17 @@
|
||||
|
||||
|
||||
#include "llvm/Analysis/LiveVar/ValueSet.h"
|
||||
#include "llvm/ConstantVals.h"
|
||||
#include "llvm/Value.h"
|
||||
#include <iostream>
|
||||
|
||||
std::ostream &operator<<(std::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 << ") ";
|
||||
return O << (void*)v << "(" << v->getName() << ") ";
|
||||
else if (isa<Constant>(v))
|
||||
return O << (void*)v << "(" << v << ") ";
|
||||
else
|
||||
return O << v << " ";
|
||||
return O << (void*)v << " ";
|
||||
}
|
||||
|
||||
void printSet(const ValueSet &S) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user