diff options
Diffstat (limited to 'llvm/unittests/Transforms')
-rw-r--r-- | llvm/unittests/Transforms/DebugIR/DebugIR.cpp | 2 | ||||
-rw-r--r-- | llvm/unittests/Transforms/Utils/Cloning.cpp | 4 | ||||
-rw-r--r-- | llvm/unittests/Transforms/Utils/SpecialCaseList.cpp | 12 |
3 files changed, 9 insertions, 9 deletions
diff --git a/llvm/unittests/Transforms/DebugIR/DebugIR.cpp b/llvm/unittests/Transforms/DebugIR/DebugIR.cpp index 9b89c1593c7..49ea09f7c6d 100644 --- a/llvm/unittests/Transforms/DebugIR/DebugIR.cpp +++ b/llvm/unittests/Transforms/DebugIR/DebugIR.cpp @@ -65,7 +65,7 @@ char * current_dir() { #if defined(LLVM_ON_WIN32) || defined(HAVE_GETCWD) // calling getcwd (or _getcwd() on windows) with a null buffer makes it // allocate a sufficiently sized buffer to store the current working dir. - return getcwd_impl(0, 0); + return getcwd_impl(nullptr, 0); #else return 0; #endif diff --git a/llvm/unittests/Transforms/Utils/Cloning.cpp b/llvm/unittests/Transforms/Utils/Cloning.cpp index fb27dc17353..b3a1f5b1052 100644 --- a/llvm/unittests/Transforms/Utils/Cloning.cpp +++ b/llvm/unittests/Transforms/Utils/Cloning.cpp @@ -32,7 +32,7 @@ namespace { class CloneInstruction : public ::testing::Test { protected: virtual void SetUp() { - V = NULL; + V = nullptr; } template <typename T> @@ -272,7 +272,7 @@ protected: void CreateNewFunc() { ValueToValueMapTy VMap; - NewFunc = CloneFunction(OldFunc, VMap, true, NULL); + NewFunc = CloneFunction(OldFunc, VMap, true, nullptr); M->getFunctionList().push_back(NewFunc); } diff --git a/llvm/unittests/Transforms/Utils/SpecialCaseList.cpp b/llvm/unittests/Transforms/Utils/SpecialCaseList.cpp index fd00687f898..bcbca493af2 100644 --- a/llvm/unittests/Transforms/Utils/SpecialCaseList.cpp +++ b/llvm/unittests/Transforms/Utils/SpecialCaseList.cpp @@ -29,9 +29,9 @@ protected: GlobalVariable *makeGlobal(StringRef Name, StringRef StructName, Module &M) { StructType *ST = - StructType::create(StructName, Type::getInt32Ty(Ctx), (Type*)0); + StructType::create(StructName, Type::getInt32Ty(Ctx), (Type*)nullptr); return new GlobalVariable( - M, ST, false, GlobalValue::ExternalLinkage, 0, Name); + M, ST, false, GlobalValue::ExternalLinkage, nullptr, Name); } GlobalAlias *makeAlias(StringRef Name, GlobalObject *Aliasee) { @@ -209,17 +209,17 @@ TEST_F(SpecialCaseListTest, Substring) { TEST_F(SpecialCaseListTest, InvalidSpecialCaseList) { std::string Error; - EXPECT_EQ(0, makeSpecialCaseList("badline", Error)); + EXPECT_EQ(nullptr, makeSpecialCaseList("badline", Error)); EXPECT_EQ("Malformed line 1: 'badline'", Error); - EXPECT_EQ(0, makeSpecialCaseList("src:bad[a-", Error)); + EXPECT_EQ(nullptr, makeSpecialCaseList("src:bad[a-", Error)); EXPECT_EQ("Malformed regex in line 1: 'bad[a-': invalid character range", Error); - EXPECT_EQ(0, makeSpecialCaseList("src:a.c\n" + EXPECT_EQ(nullptr, makeSpecialCaseList("src:a.c\n" "fun:fun(a\n", Error)); EXPECT_EQ("Malformed regex in line 2: 'fun(a': parentheses not balanced", Error); - EXPECT_EQ(0, SpecialCaseList::create("unexisting", Error)); + EXPECT_EQ(nullptr, SpecialCaseList::create("unexisting", Error)); EXPECT_EQ(0U, Error.find("Can't open file 'unexisting':")); } |