summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/bugpoint/BugDriver.cpp2
-rw-r--r--llvm/tools/bugpoint/BugDriver.h6
-rw-r--r--llvm/tools/bugpoint/ToolRunner.h16
-rw-r--r--llvm/tools/lli/RemoteMemoryManager.h2
-rw-r--r--llvm/tools/lli/Unix/RPCChannel.inc4
-rw-r--r--llvm/tools/llvm-diff/DifferenceEngine.h2
-rw-r--r--llvm/tools/llvm-readobj/ARMEHABIPrinter.h2
7 files changed, 18 insertions, 16 deletions
diff --git a/llvm/tools/bugpoint/BugDriver.cpp b/llvm/tools/bugpoint/BugDriver.cpp
index e4f66ed5b31..cecccbe0f0e 100644
--- a/llvm/tools/bugpoint/BugDriver.cpp
+++ b/llvm/tools/bugpoint/BugDriver.cpp
@@ -116,7 +116,7 @@ Module *llvm::ParseInputFile(const std::string &Filename,
// parsed), and false on success.
//
bool BugDriver::addSources(const std::vector<std::string> &Filenames) {
- assert(Program == 0 && "Cannot call addSources multiple times!");
+ assert(!Program && "Cannot call addSources multiple times!");
assert(!Filenames.empty() && "Must specify at least on input filename!");
// Load the first input file.
diff --git a/llvm/tools/bugpoint/BugDriver.h b/llvm/tools/bugpoint/BugDriver.h
index c01bbe557dc..3169d293da0 100644
--- a/llvm/tools/bugpoint/BugDriver.h
+++ b/llvm/tools/bugpoint/BugDriver.h
@@ -202,7 +202,7 @@ public:
const std::string &BitcodeFile = "",
const std::string &SharedObj = "",
bool RemoveBitcode = false,
- std::string *Error = 0) const;
+ std::string *Error = nullptr) const;
/// EmitProgressBitcode - This function is used to output M to a file named
/// "bugpoint-ID.bc".
@@ -244,7 +244,7 @@ public:
/// this method will never return null.
Module *runPassesOn(Module *M, const std::vector<std::string> &Passes,
bool AutoDebugCrashes = false, unsigned NumExtraArgs = 0,
- const char * const *ExtraArgs = NULL);
+ const char * const *ExtraArgs = nullptr);
/// runPasses - Run the specified passes on Program, outputting a bitcode
/// file and writting the filename into OutputFile if successful. If the
@@ -259,7 +259,7 @@ public:
const std::vector<std::string> &PassesToRun,
std::string &OutputFilename, bool DeleteOutput = false,
bool Quiet = false, unsigned NumExtraArgs = 0,
- const char * const *ExtraArgs = NULL) const;
+ const char * const *ExtraArgs = nullptr) const;
/// runManyPasses - Take the specified pass list and create different
/// combinations of passes to compile the program with. Compile the program with
diff --git a/llvm/tools/bugpoint/ToolRunner.h b/llvm/tools/bugpoint/ToolRunner.h
index 38a58356a65..6e7b95c7847 100644
--- a/llvm/tools/bugpoint/ToolRunner.h
+++ b/llvm/tools/bugpoint/ToolRunner.h
@@ -63,7 +63,7 @@ public:
FileType fileType,
const std::string &InputFile,
const std::string &OutputFile,
- std::string *Error = 0,
+ std::string *Error = nullptr,
const std::vector<std::string> &GCCArgs =
std::vector<std::string>(),
unsigned Timeout = 0,
@@ -89,15 +89,17 @@ class AbstractInterpreter {
public:
static LLC *createLLC(const char *Argv0, std::string &Message,
const std::string &GCCBinary,
- const std::vector<std::string> *Args = 0,
- const std::vector<std::string> *GCCArgs = 0,
+ const std::vector<std::string> *Args = nullptr,
+ const std::vector<std::string> *GCCArgs = nullptr,
bool UseIntegratedAssembler = false);
- static AbstractInterpreter* createLLI(const char *Argv0, std::string &Message,
- const std::vector<std::string> *Args=0);
+ static AbstractInterpreter*
+ createLLI(const char *Argv0, std::string &Message,
+ const std::vector<std::string> *Args = nullptr);
- static AbstractInterpreter* createJIT(const char *Argv0, std::string &Message,
- const std::vector<std::string> *Args=0);
+ static AbstractInterpreter*
+ createJIT(const char *Argv0, std::string &Message,
+ const std::vector<std::string> *Args = nullptr);
static AbstractInterpreter*
createCustomCompiler(std::string &Message,
diff --git a/llvm/tools/lli/RemoteMemoryManager.h b/llvm/tools/lli/RemoteMemoryManager.h
index 11f600f3c73..cf5d7c6e5db 100644
--- a/llvm/tools/lli/RemoteMemoryManager.h
+++ b/llvm/tools/lli/RemoteMemoryManager.h
@@ -63,7 +63,7 @@ private:
RemoteTarget *Target;
public:
- RemoteMemoryManager() : Target(NULL) {}
+ RemoteMemoryManager() : Target(nullptr) {}
virtual ~RemoteMemoryManager();
uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment,
diff --git a/llvm/tools/lli/Unix/RPCChannel.inc b/llvm/tools/lli/Unix/RPCChannel.inc
index 4d245d66c12..6a9ae14b599 100644
--- a/llvm/tools/lli/Unix/RPCChannel.inc
+++ b/llvm/tools/lli/Unix/RPCChannel.inc
@@ -60,7 +60,7 @@ bool RPCChannel::createServer() {
}
// Execute the child process.
- char *args[1] = { NULL };
+ char *args[1] = { nullptr };
int rc = execv(ChildName.c_str(), args);
if (rc != 0)
perror("Error executing child process: ");
@@ -84,7 +84,7 @@ bool RPCChannel::createClient() {
return true;
}
-void RPCChannel::Wait() { wait(NULL); }
+void RPCChannel::Wait() { wait(nullptr); }
static bool CheckError(int rc, size_t Size, const char *Desc) {
if (rc < 0) {
diff --git a/llvm/tools/llvm-diff/DifferenceEngine.h b/llvm/tools/llvm-diff/DifferenceEngine.h
index 73bf6eb6ea5..44709685a36 100644
--- a/llvm/tools/llvm-diff/DifferenceEngine.h
+++ b/llvm/tools/llvm-diff/DifferenceEngine.h
@@ -59,7 +59,7 @@ namespace llvm {
};
DifferenceEngine(Consumer &consumer)
- : consumer(consumer), globalValueOracle(0) {}
+ : consumer(consumer), globalValueOracle(nullptr) {}
void diff(Module *L, Module *R);
void diff(Function *L, Function *R);
diff --git a/llvm/tools/llvm-readobj/ARMEHABIPrinter.h b/llvm/tools/llvm-readobj/ARMEHABIPrinter.h
index 388171dc82d..7608cfbbd8d 100644
--- a/llvm/tools/llvm-readobj/ARMEHABIPrinter.h
+++ b/llvm/tools/llvm-readobj/ARMEHABIPrinter.h
@@ -385,7 +385,7 @@ PrinterContext<ET>::FindExceptionTable(unsigned IndexSectionIndex,
}
}
}
- return NULL;
+ return nullptr;
}
template <typename ET>
OpenPOWER on IntegriCloud