summaryrefslogtreecommitdiffstats
path: root/llvm/lib/TableGen/SetTheory.cpp
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2017-06-16 00:43:26 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2017-06-16 00:43:26 +0000
commitaf6158962d89f16a6b3efb2dd23f9d63dd160f5b (patch)
treefea39977a9ceb5ab9d2feda15c4af072ce9fa74c /llvm/lib/TableGen/SetTheory.cpp
parentf9bc0589353e8e478d798aa9b8790978f6b2432e (diff)
downloadbcm5719-llvm-af6158962d89f16a6b3efb2dd23f9d63dd160f5b.tar.gz
bcm5719-llvm-af6158962d89f16a6b3efb2dd23f9d63dd160f5b.zip
[BinaryFormat, Option, TableGen] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 305537
Diffstat (limited to 'llvm/lib/TableGen/SetTheory.cpp')
-rw-r--r--llvm/lib/TableGen/SetTheory.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/llvm/lib/TableGen/SetTheory.cpp b/llvm/lib/TableGen/SetTheory.cpp
index a4d33051b4f..733e0aeef62 100644
--- a/llvm/lib/TableGen/SetTheory.cpp
+++ b/llvm/lib/TableGen/SetTheory.cpp
@@ -12,18 +12,29 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/TableGen/SetTheory.h"
+#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/Casting.h"
#include "llvm/Support/Format.h"
+#include "llvm/Support/SMLoc.h"
+#include "llvm/Support/raw_ostream.h"
#include "llvm/TableGen/Error.h"
#include "llvm/TableGen/Record.h"
+#include "llvm/TableGen/SetTheory.h"
+#include <algorithm>
+#include <cstdint>
+#include <string>
+#include <utility>
using namespace llvm;
// Define the standard operators.
namespace {
-typedef SetTheory::RecSet RecSet;
-typedef SetTheory::RecVec RecVec;
+using RecSet = SetTheory::RecSet;
+using RecVec = SetTheory::RecVec;
// (add a, b, ...) Evaluate and union all arguments.
struct AddOp : public SetTheory::Operator {
@@ -237,13 +248,13 @@ struct FieldExpander : public SetTheory::Expander {
ST.evaluate(Def->getValueInit(FieldName), Elts, Def->getLoc());
}
};
+
} // end anonymous namespace
// Pin the vtables to this file.
void SetTheory::Operator::anchor() {}
void SetTheory::Expander::anchor() {}
-
SetTheory::SetTheory() {
addOperator("add", llvm::make_unique<AddOp>());
addOperator("sub", llvm::make_unique<SubOp>());
@@ -321,4 +332,3 @@ const RecVec *SetTheory::expand(Record *Set) {
// Set is not expandable.
return nullptr;
}
-
OpenPOWER on IntegriCloud