summaryrefslogtreecommitdiff
path: root/lib/Bitcode/Reader/ValueList.cpp
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2017-09-07 23:28:24 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2017-09-07 23:28:24 +0000
commitf95cab8de62de8cd053baad154978077d9a06db9 (patch)
treef93e9b549ccdc023ce503850c7143a6598283521 /lib/Bitcode/Reader/ValueList.cpp
parent66191214920d276b836d0ec1760d8ce0795d01b7 (diff)
[Bitcode] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312760 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader/ValueList.cpp')
-rw-r--r--lib/Bitcode/Reader/ValueList.cpp29
1 files changed, 23 insertions, 6 deletions
diff --git a/lib/Bitcode/Reader/ValueList.cpp b/lib/Bitcode/Reader/ValueList.cpp
index f2a3439a87b..08bfa291098 100644
--- a/lib/Bitcode/Reader/ValueList.cpp
+++ b/lib/Bitcode/Reader/ValueList.cpp
@@ -1,4 +1,4 @@
-//===----- ValueList.cpp - Internal BitcodeReader implementation ----------===//
+//===- ValueList.cpp - Internal BitcodeReader implementation --------------===//
//
// The LLVM Compiler Infrastructure
//
@@ -8,27 +8,44 @@
//===----------------------------------------------------------------------===//
#include "ValueList.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/IR/Argument.h"
+#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
-#include "llvm/IR/Instructions.h"
+#include "llvm/IR/GlobalValue.h"
+#include "llvm/IR/Instruction.h"
+#include "llvm/IR/Type.h"
+#include "llvm/IR/User.h"
+#include "llvm/IR/Value.h"
+#include "llvm/IR/ValueHandle.h"
+#include "llvm/Support/Casting.h"
+#include "llvm/Support/ErrorHandling.h"
+#include <algorithm>
+#include <cassert>
+#include <cstddef>
+#include <limits>
+#include <utility>
using namespace llvm;
namespace llvm {
+
namespace {
/// \brief A class for maintaining the slot number definition
/// as a placeholder for the actual definition for forward constants defs.
class ConstantPlaceHolder : public ConstantExpr {
- void operator=(const ConstantPlaceHolder &) = delete;
-
public:
- // allocate space for exactly one operand
- void *operator new(size_t s) { return User::operator new(s, 1); }
explicit ConstantPlaceHolder(Type *Ty, LLVMContext &Context)
: ConstantExpr(Ty, Instruction::UserOp1, &Op<0>(), 1) {
Op<0>() = UndefValue::get(Type::getInt32Ty(Context));
}
+ ConstantPlaceHolder &operator=(const ConstantPlaceHolder &) = delete;
+
+ // allocate space for exactly one operand
+ void *operator new(size_t s) { return User::operator new(s, 1); }
+
/// \brief Methods to support type inquiry through isa, cast, and dyn_cast.
static bool classof(const Value *V) {
return isa<ConstantExpr>(V) &&