[C++11] Make use of 'nullptr' in the Support library.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205697 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper
2014-04-07 04:17:22 +00:00
parent b81024bc6e
commit 34bc6b6e78
75 changed files with 336 additions and 328 deletions

View File

@@ -57,7 +57,7 @@ const char *Triple::getArchTypeName(ArchType Kind) {
const char *Triple::getArchTypePrefix(ArchType Kind) {
switch (Kind) {
default:
return 0;
return nullptr;
case aarch64:
case aarch64_be: return "aarch64";
@@ -210,7 +210,7 @@ Triple::ArchType Triple::getArchTypeForLLVMName(StringRef Name) {
// Returns architecture name that is understood by the target assembler.
const char *Triple::getArchNameForAssembler() {
if (!isOSDarwin() && getVendor() != Triple::Apple)
return NULL;
return nullptr;
return StringSwitch<const char*>(getArchName())
.Case("i386", "i386")
@@ -232,7 +232,7 @@ const char *Triple::getArchNameForAssembler() {
.Case("amdil", "amdil")
.Case("spir", "spir")
.Case("spir64", "spir64")
.Default(NULL);
.Default(nullptr);
}
static Triple::ArchType parseArch(StringRef ArchName) {