aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/CodeGenTarget.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-19 00:50:47 +0000
committerChris Lattner <sabre@nondot.org>2010-03-19 00:50:47 +0000
commit2d822ab185bbacd47847dac9cedcf570f310620f (patch)
tree0741a3145b55472568dc8ab76dff1334dae52d2e /llvm/utils/TableGen/CodeGenTarget.h
parent45e2fc5ac1a30c0b6506b43bd6b359620a6d5fe7 (diff)
downloadllvm-2d822ab185bbacd47847dac9cedcf570f310620f.zip
llvm-2d822ab185bbacd47847dac9cedcf570f310620f.tar.gz
llvm-2d822ab185bbacd47847dac9cedcf570f310620f.tar.bz2
revert 98912
llvm-svn: 98914
Diffstat (limited to 'llvm/utils/TableGen/CodeGenTarget.h')
-rw-r--r--llvm/utils/TableGen/CodeGenTarget.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.h b/llvm/utils/TableGen/CodeGenTarget.h
index a0e631e..ac6574d 100644
--- a/llvm/utils/TableGen/CodeGenTarget.h
+++ b/llvm/utils/TableGen/CodeGenTarget.h
@@ -71,7 +71,7 @@ class CodeGenTarget {
void ReadInstructions() const;
void ReadLegalValueTypes() const;
- mutable std::vector<const CodeGenInstruction*> InstrsByEnum;
+ std::vector<const CodeGenInstruction*> InstrsByEnum;
public:
CodeGenTarget();
@@ -205,25 +205,25 @@ public:
CodeGenInstruction &getInstruction(const Record *InstRec) const;
+ typedef std::map<std::string,
+ CodeGenInstruction>::const_iterator inst_iterator;
+ inst_iterator inst_begin() const { return getInstructions().begin(); }
+ inst_iterator inst_end() const { return Instructions.end(); }
+
/// getInstructionsByEnumValue - Return all of the instructions defined by the
/// target, ordered by their enum value.
- const std::vector<const CodeGenInstruction*> &
- getInstructionsByEnumValue() const {
+ const std::vector<const CodeGenInstruction*> &getInstructionsByEnumValue() {
if (InstrsByEnum.empty()) ComputeInstrsByEnum();
return InstrsByEnum;
}
- typedef std::vector<const CodeGenInstruction*>::const_iterator inst_iterator;
- inst_iterator inst_begin() const{return getInstructionsByEnumValue().begin();}
- inst_iterator inst_end() const { return getInstructionsByEnumValue().end(); }
-
-
+
/// isLittleEndianEncoding - are instruction bit patterns defined as [0..n]?
///
bool isLittleEndianEncoding() const;
private:
- void ComputeInstrsByEnum() const;
+ void ComputeInstrsByEnum();
};
/// ComplexPattern - ComplexPattern info, corresponding to the ComplexPattern