summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/DAGISelEmitter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-16 07:26:36 +0000
committerChris Lattner <sabre@nondot.org>2010-02-16 07:26:36 +0000
commit52bfe24e2c12a62111fff066ca64ef241d2b2c10 (patch)
tree2f804f0e88a5883b29903de94fc9a88fce6f6a70 /llvm/utils/TableGen/DAGISelEmitter.cpp
parent5ce83039509fa2329b84ebec0b957e5fb7d8f222 (diff)
downloadbcm5719-llvm-52bfe24e2c12a62111fff066ca64ef241d2b2c10.tar.gz
bcm5719-llvm-52bfe24e2c12a62111fff066ca64ef241d2b2c10.zip
mark all the generated node predicates 'const'.
llvm-svn: 96337
Diffstat (limited to 'llvm/utils/TableGen/DAGISelEmitter.cpp')
-rw-r--r--llvm/utils/TableGen/DAGISelEmitter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/DAGISelEmitter.cpp b/llvm/utils/TableGen/DAGISelEmitter.cpp
index 639c148781a..f0cebeddd3a 100644
--- a/llvm/utils/TableGen/DAGISelEmitter.cpp
+++ b/llvm/utils/TableGen/DAGISelEmitter.cpp
@@ -270,14 +270,14 @@ void DAGISelEmitter::EmitPredicateFunctions(raw_ostream &OS) {
if (P->getOnlyTree()->isLeaf())
OS << "inline bool Predicate_" << PatFragRecord->getName()
- << "(SDNode *N) {\n";
+ << "(SDNode *N) const {\n";
else {
std::string ClassName =
CGP.getSDNodeInfo(P->getOnlyTree()->getOperator()).getSDClassName();
const char *C2 = ClassName == "SDNode" ? "N" : "inN";
OS << "inline bool Predicate_" << PatFragRecord->getName()
- << "(SDNode *" << C2 << ") {\n";
+ << "(SDNode *" << C2 << ") const {\n";
if (ClassName != "SDNode")
OS << " " << ClassName << " *N = cast<" << ClassName << ">(inN);\n";
}
OpenPOWER on IntegriCloud