aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp
diff options
context:
space:
mode:
authorRahul Joshi <rjoshi@nvidia.com>2024-10-02 09:48:26 -0700
committerGitHub <noreply@github.com>2024-10-02 09:48:26 -0700
commitd256b9e88b7aa9155380a4e70d39a2a0121ff917 (patch)
tree93a1d293a53a37bdcd8230e6d896362760328e01 /llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp
parent1905cdbf4ef15565504036c52725cb0622ee64ef (diff)
downloadllvm-d256b9e88b7aa9155380a4e70d39a2a0121ff917.zip
llvm-d256b9e88b7aa9155380a4e70d39a2a0121ff917.tar.gz
llvm-d256b9e88b7aa9155380a4e70d39a2a0121ff917.tar.bz2
[TableGen] Change `DefInit::Def` to a const Record pointer (#110747)
This change undoes a const_cast<> introduced in an earlier change to help transition to const pointers. It is a part of effort to have better const correctness in TableGen backends: https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
Diffstat (limited to 'llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp')
-rw-r--r--llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp
index dd728da..751ac3d 100644
--- a/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp
+++ b/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp
@@ -3698,7 +3698,7 @@ static bool hasNullFragReference(DagInit *DI) {
DefInit *OpDef = dyn_cast<DefInit>(DI->getOperator());
if (!OpDef)
return false;
- Record *Operator = OpDef->getDef();
+ const Record *Operator = OpDef->getDef();
// If this is the null fragment, return true.
if (Operator->getName() == "null_frag")