aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm/utils/TableGen/CodeGenMapTable.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-05-27 20:26:41 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-05-27 20:26:41 +0000
commitff0cc061ecf297f1556e906d229826fd709f37d6 (patch)
treebd13a22d9db57ccf3eddbc07b32c18109521d050 /contrib/llvm/utils/TableGen/CodeGenMapTable.cpp
parente14ba20ace4c6ab45aca5130defd992ab7d6bf5f (diff)
parent5a5ac124e1efaf208671f01c46edb15f29ed2a0b (diff)
Notes
Diffstat (limited to 'contrib/llvm/utils/TableGen/CodeGenMapTable.cpp')
-rw-r--r--contrib/llvm/utils/TableGen/CodeGenMapTable.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/llvm/utils/TableGen/CodeGenMapTable.cpp b/contrib/llvm/utils/TableGen/CodeGenMapTable.cpp
index 7e5aa9c161b4..b52a91d0177b 100644
--- a/contrib/llvm/utils/TableGen/CodeGenMapTable.cpp
+++ b/contrib/llvm/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";