improve const correctness.

llvm-svn: 45646
This commit is contained in:
Chris Lattner 2008-01-06 01:52:22 +00:00
parent e9f0c9b6f9
commit 7414f541ca
3 changed files with 3 additions and 3 deletions

View File

@ -1661,7 +1661,7 @@ void CodeGenDAGPatterns::ParseInstructions() {
for (std::map<Record*, DAGInstruction>::iterator II = Instructions.begin(),
E = Instructions.end(); II != E; ++II) {
DAGInstruction &TheInst = II->second;
TreePattern *I = TheInst.getPattern();
const TreePattern *I = TheInst.getPattern();
if (I == 0) continue; // No pattern.
// FIXME: Assume only the first tree is the pattern. The others are clobber

View File

@ -374,7 +374,7 @@ public:
ImpResults(impresults), ImpOperands(impoperands),
ResultPattern(0) {}
TreePattern *getPattern() const { return Pattern; }
const TreePattern *getPattern() const { return Pattern; }
unsigned getNumResults() const { return Results.size(); }
unsigned getNumOperands() const { return Operands.size(); }
unsigned getNumImpResults() const { return ImpResults.size(); }

View File

@ -827,7 +827,7 @@ public:
const CodeGenTarget &CGT = CGP.getTargetInfo();
CodeGenInstruction &II = CGT.getInstruction(Op->getName());
const DAGInstruction &Inst = CGP.getInstruction(Op);
TreePattern *InstPat = Inst.getPattern();
const TreePattern *InstPat = Inst.getPattern();
// FIXME: Assume actual pattern comes before "implicit".
TreePatternNode *InstPatNode =
isRoot ? (InstPat ? InstPat->getTree(0) : Pattern)