summaryrefslogtreecommitdiffstats
path: root/utils/TableGen/CodeGenMapTable.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-05-27 18:44:32 +0000
committerdim <dim@FreeBSD.org>2015-05-27 18:44:32 +0000
commit782067d0278612ee75d024b9b135c221c327e9e8 (patch)
treea6140557876943cdd800ee997c9317283394b22c /utils/TableGen/CodeGenMapTable.cpp
parent6669eceb008a9f13853b330dc0b099d6386fe879 (diff)
downloadFreeBSD-src-782067d0278612ee75d024b9b135c221c327e9e8.zip
FreeBSD-src-782067d0278612ee75d024b9b135c221c327e9e8.tar.gz
Vendor import of llvm trunk r238337:
https://llvm.org/svn/llvm-project/llvm/trunk@238337
Diffstat (limited to 'utils/TableGen/CodeGenMapTable.cpp')
-rw-r--r--utils/TableGen/CodeGenMapTable.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/TableGen/CodeGenMapTable.cpp b/utils/TableGen/CodeGenMapTable.cpp
index 7e5aa9c..b52a91d 100644
--- a/utils/TableGen/CodeGenMapTable.cpp
+++ b/utils/TableGen/CodeGenMapTable.cpp
@@ -128,7 +128,7 @@ public:
ListInit *ColValList = MapRec->getValueAsListInit("ValueCols");
// Each instruction map must specify at least one column for it to be valid.
- if (ColValList->getSize() == 0)
+ if (ColValList->empty())
PrintFatalError(MapRec->getLoc(), "InstrMapping record `" +
MapRec->getName() + "' has empty " + "`ValueCols' field!");
@@ -376,7 +376,7 @@ unsigned MapTableEmitter::emitBinSearchTable(raw_ostream &OS) {
std::vector<Record*> ColInstrs = MapTable[CurInstr];
std::string OutStr("");
unsigned RelExists = 0;
- if (ColInstrs.size()) {
+ if (!ColInstrs.empty()) {
for (unsigned j = 0; j < NumCol; j++) {
if (ColInstrs[j] != nullptr) {
RelExists = 1;
@@ -567,7 +567,7 @@ void EmitMapTable(RecordKeeper &Records, raw_ostream &OS) {
std::vector<Record*> InstrMapVec;
InstrMapVec = Records.getAllDerivedDefinitions("InstrMapping");
- if (!InstrMapVec.size())
+ if (InstrMapVec.empty())
return;
OS << "#ifdef GET_INSTRMAP_INFO\n";
OpenPOWER on IntegriCloud