summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/LLVMContextImpl.cpp
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2017-06-19 22:05:08 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2017-06-19 22:05:08 +0000
commitde6cce2236c53f08107ab60dc47f3b7e4f5cc939 (patch)
tree98578356dcb77c611b2c07a9e52f8c033749745d /llvm/lib/IR/LLVMContextImpl.cpp
parentbe548aceefed9b27c86b62cb3a0cc24a24eecb0e (diff)
downloadbcm5719-llvm-de6cce2236c53f08107ab60dc47f3b7e4f5cc939.tar.gz
bcm5719-llvm-de6cce2236c53f08107ab60dc47f3b7e4f5cc939.zip
[IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC).
llvm-svn: 305755
Diffstat (limited to 'llvm/lib/IR/LLVMContextImpl.cpp')
-rw-r--r--llvm/lib/IR/LLVMContextImpl.cpp30
1 files changed, 10 insertions, 20 deletions
diff --git a/llvm/lib/IR/LLVMContextImpl.cpp b/llvm/lib/IR/LLVMContextImpl.cpp
index 4a30d28c391..c19e1be44fd 100644
--- a/llvm/lib/IR/LLVMContextImpl.cpp
+++ b/llvm/lib/IR/LLVMContextImpl.cpp
@@ -1,4 +1,4 @@
-//===-- LLVMContextImpl.cpp - Implement LLVMContextImpl -------------------===//
+//===- LLVMContextImpl.cpp - Implement LLVMContextImpl --------------------===//
//
// The LLVM Compiler Infrastructure
//
@@ -12,18 +12,17 @@
//===----------------------------------------------------------------------===//
#include "LLVMContextImpl.h"
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/IR/Attributes.h"
-#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/OptBisect.h"
+#include "llvm/IR/Type.h"
#include "llvm/Support/ManagedStatic.h"
-#include <algorithm>
+#include <cassert>
+#include <utility>
+
using namespace llvm;
LLVMContextImpl::LLVMContextImpl(LLVMContext &C)
- : TheTrueVal(nullptr), TheFalseVal(nullptr),
- VoidTy(C, Type::VoidTyID),
+ : VoidTy(C, Type::VoidTyID),
LabelTy(C, Type::LabelTyID),
HalfTy(C, Type::HalfTyID),
FloatTy(C, Type::FloatTyID),
@@ -39,17 +38,7 @@ LLVMContextImpl::LLVMContextImpl(LLVMContext &C)
Int16Ty(C, 16),
Int32Ty(C, 32),
Int64Ty(C, 64),
- Int128Ty(C, 128) {
- InlineAsmDiagHandler = nullptr;
- InlineAsmDiagContext = nullptr;
- DiagnosticHandler = nullptr;
- DiagnosticContext = nullptr;
- RespectDiagnosticFilters = false;
- DiagnosticHotnessRequested = false;
- YieldCallback = nullptr;
- YieldOpaqueHandle = nullptr;
- NamedStructTypesUniqueID = 0;
-}
+ Int128Ty(C, 128) {}
LLVMContextImpl::~LLVMContextImpl() {
// NOTE: We need to delete the contents of OwnedModules, but Module's dtor
@@ -156,7 +145,6 @@ void LLVMContextImpl::dropTriviallyDeadConstantArrays() {
C->destroyConstant();
}
}
-
} while (Changed);
}
@@ -165,6 +153,7 @@ void Module::dropTriviallyDeadConstantArrays() {
}
namespace llvm {
+
/// \brief Make MDOperand transparent for hashing.
///
/// This overload of an implementation detail of the hashing library makes
@@ -179,7 +168,8 @@ namespace llvm {
/// does not cause MDOperand to be transparent. In particular, a bare pointer
/// doesn't get hashed before it's combined, whereas \a MDOperand would.
static const Metadata *get_hashable_data(const MDOperand &X) { return X.get(); }
-}
+
+} // end namespace llvm
unsigned MDNodeOpsKey::calculateHash(MDNode *N, unsigned Offset) {
unsigned Hash = hash_combine_range(N->op_begin() + Offset, N->op_end());
OpenPOWER on IntegriCloud