aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/LLVMContext.cpp
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2016-04-28 18:04:41 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2016-04-28 18:04:41 +0000
commit5354a8aa4d22b90f72092cefe35890ce66d6056e (patch)
treedb8b22874ef1744ee50a6565546626671e8e25ed /llvm/lib/IR/LLVMContext.cpp
parent9253135c153e16da9eae056a7d16a85656bb633e (diff)
downloadllvm-5354a8aa4d22b90f72092cefe35890ce66d6056e.zip
llvm-5354a8aa4d22b90f72092cefe35890ce66d6056e.tar.gz
llvm-5354a8aa4d22b90f72092cefe35890ce66d6056e.tar.bz2
Fix some Clang-tidy modernize and Include What You Use warnings.
Differential revision: http://reviews.llvm.org/D19673 llvm-svn: 267910
Diffstat (limited to 'llvm/lib/IR/LLVMContext.cpp')
-rw-r--r--llvm/lib/IR/LLVMContext.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp
index ee95c4f8..9369cbd 100644
--- a/llvm/lib/IR/LLVMContext.cpp
+++ b/llvm/lib/IR/LLVMContext.cpp
@@ -13,16 +13,23 @@
//===----------------------------------------------------------------------===//
#include "llvm/IR/LLVMContext.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/StringMap.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/ADT/Twine.h"
#include "LLVMContextImpl.h"
-#include "llvm/IR/Constants.h"
-#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/DiagnosticPrinter.h"
-#include "llvm/IR/Instruction.h"
#include "llvm/IR/Metadata.h"
-#include "llvm/Support/ManagedStatic.h"
-#include "llvm/Support/SourceMgr.h"
-#include <cctype>
+#include "llvm/IR/Module.h"
+#include "llvm/Support/Casting.h"
+#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/raw_ostream.h"
+#include <cassert>
+#include <cstdlib>
+#include <string>
+#include <utility>
+
using namespace llvm;
LLVMContext::LLVMContext() : pImpl(new LLVMContextImpl(*this)) {
@@ -142,6 +149,7 @@ LLVMContext::LLVMContext() : pImpl(new LLVMContextImpl(*this)) {
"gc-transition operand bundle id drifted!");
(void)GCTransitionEntry;
}
+
LLVMContext::~LLVMContext() { delete pImpl; }
void LLVMContext::addModule(Module *M) {
@@ -300,9 +308,11 @@ void LLVMContext::setGC(const Function &Fn, std::string GCName) {
}
It->second = std::move(GCName);
}
+
const std::string &LLVMContext::getGC(const Function &Fn) {
return pImpl->GCNames[&Fn];
}
+
void LLVMContext::deleteGC(const Function &Fn) {
pImpl->GCNames.erase(&Fn);
}