summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/modularize/ModuleAssistant.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-06-09 02:03:06 +0000
committerCraig Topper <craig.topper@gmail.com>2014-06-09 02:03:06 +0000
commitf61be9c971d20d1f30f5444e525990b78a71d65e (patch)
treeb4f659ba8282a1e3b34ca932f1e87e1a61f42479 /clang-tools-extra/modularize/ModuleAssistant.cpp
parent3fe0c876c427d8da80fd1bd2f94f2605fc802268 (diff)
downloadbcm5719-llvm-f61be9c971d20d1f30f5444e525990b78a71d65e.tar.gz
bcm5719-llvm-f61be9c971d20d1f30f5444e525990b78a71d65e.zip
[C++11] Use 'nullptr'.
llvm-svn: 210447
Diffstat (limited to 'clang-tools-extra/modularize/ModuleAssistant.cpp')
-rw-r--r--clang-tools-extra/modularize/ModuleAssistant.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang-tools-extra/modularize/ModuleAssistant.cpp b/clang-tools-extra/modularize/ModuleAssistant.cpp
index 384ac1b807c..ba9912dfb33 100644
--- a/clang-tools-extra/modularize/ModuleAssistant.cpp
+++ b/clang-tools-extra/modularize/ModuleAssistant.cpp
@@ -124,7 +124,7 @@ Module *Module::findSubModule(llvm::StringRef SubName) {
if ((*I)->Name == SubName)
return *I;
}
- return 0;
+ return nullptr;
}
// Implementation functions:
@@ -135,7 +135,7 @@ Module *Module::findSubModule(llvm::StringRef SubName) {
static const char *ReservedNames[] = {
"config_macros", "export", "module", "conflict", "framework",
"requires", "exclude", "header", "private", "explicit",
- "link", "umbrella", "extern", "use", 0 // Flag end.
+ "link", "umbrella", "extern", "use", nullptr // Flag end.
};
// Convert module name to a non-keyword.
@@ -143,7 +143,7 @@ static const char *ReservedNames[] = {
static std::string
ensureNoCollisionWithReservedName(llvm::StringRef MightBeReservedName) {
std::string SafeName = MightBeReservedName;
- for (int Index = 0; ReservedNames[Index] != 0; ++Index) {
+ for (int Index = 0; ReservedNames[Index] != nullptr; ++Index) {
if (MightBeReservedName == ReservedNames[Index]) {
SafeName.insert(0, "_");
break;
@@ -190,7 +190,7 @@ static bool addModuleDescription(Module *RootModule,
std::string Stem = llvm::sys::path::stem(*I);
Stem = ensureNoCollisionWithReservedName(Stem);
Module *SubModule = CurrentModule->findSubModule(Stem);
- if (SubModule == 0) {
+ if (!SubModule) {
SubModule = new Module(Stem);
CurrentModule->SubModules.push_back(SubModule);
}
@@ -222,7 +222,7 @@ static Module *loadModuleDescriptions(
I != E; ++I) {
// Add as a module.
if (!addModuleDescription(RootModule, *I, HeaderPrefix, Dependencies))
- return NULL;
+ return nullptr;
}
return RootModule;
OpenPOWER on IntegriCloud