summaryrefslogtreecommitdiffstats
path: root/llvm/lib/TableGen/Record.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2015-05-29 05:51:32 +0000
committerCraig Topper <craig.topper@gmail.com>2015-05-29 05:51:32 +0000
commit2af5e6fbf921401f6dc5d71a44cbc1b609c1d30c (patch)
tree656f41f8e3d33d709045994692a572ea4c135510 /llvm/lib/TableGen/Record.cpp
parent76c757cc353e3e564bf495aaa64a2822c396cb59 (diff)
downloadbcm5719-llvm-2af5e6fbf921401f6dc5d71a44cbc1b609c1d30c.tar.gz
bcm5719-llvm-2af5e6fbf921401f6dc5d71a44cbc1b609c1d30c.zip
[TableGen] Remove convertValue functions for UnOpInit, BinOpInit, and TernOpInit as they weren't able to be called.
I don't think converting the inputs to the Ops was the right behavior anyway. llvm-svn: 238543
Diffstat (limited to 'llvm/lib/TableGen/Record.cpp')
-rw-r--r--llvm/lib/TableGen/Record.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp
index 3089a13c6bc..534411364e9 100644
--- a/llvm/lib/TableGen/Record.cpp
+++ b/llvm/lib/TableGen/Record.cpp
@@ -247,31 +247,6 @@ bool IntRecTy::baseClassOf(const RecTy *RHS) const{
return kind==BitRecTyKind || kind==BitsRecTyKind || kind==IntRecTyKind;
}
-Init *StringRecTy::convertValue(UnOpInit *UO) {
- if (UO->getOpcode() == UnOpInit::CAST) {
- Init *L = UO->getOperand()->convertInitializerTo(this);
- if (!L) return nullptr;
- if (L != UO->getOperand())
- return UnOpInit::get(UnOpInit::CAST, L, StringRecTy::get());
- return UO;
- }
-
- return convertValue((TypedInit*)UO);
-}
-
-Init *StringRecTy::convertValue(BinOpInit *BO) {
- if (BO->getOpcode() == BinOpInit::STRCONCAT) {
- Init *L = BO->getLHS()->convertInitializerTo(this);
- Init *R = BO->getRHS()->convertInitializerTo(this);
- if (!L || !R) return nullptr;
- if (L != BO->getLHS() || R != BO->getRHS())
- return BinOpInit::get(BinOpInit::STRCONCAT, L, R, StringRecTy::get());
- return BO;
- }
-
- return convertValue((TypedInit*)BO);
-}
-
Init *StringRecTy::convertValue(TypedInit *TI) {
if (isa<StringRecTy>(TI->getType()))
@@ -320,29 +295,6 @@ Init *DagRecTy::convertValue(TypedInit *TI) {
return nullptr;
}
-Init *DagRecTy::convertValue(UnOpInit *UO) {
- if (UO->getOpcode() == UnOpInit::CAST) {
- Init *L = UO->getOperand()->convertInitializerTo(this);
- if (!L) return nullptr;
- if (L != UO->getOperand())
- return UnOpInit::get(UnOpInit::CAST, L, DagRecTy::get());
- return UO;
- }
- return nullptr;
-}
-
-Init *DagRecTy::convertValue(BinOpInit *BO) {
- if (BO->getOpcode() == BinOpInit::CONCAT) {
- Init *L = BO->getLHS()->convertInitializerTo(this);
- Init *R = BO->getRHS()->convertInitializerTo(this);
- if (!L || !R) return nullptr;
- if (L != BO->getLHS() || R != BO->getRHS())
- return BinOpInit::get(BinOpInit::CONCAT, L, R, DagRecTy::get());
- return BO;
- }
- return nullptr;
-}
-
RecordRecTy *RecordRecTy::get(Record *R) {
return dyn_cast<RecordRecTy>(R->getDefInit()->getType());
}
OpenPOWER on IntegriCloud