summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/Support')
-rw-r--r--llvm/unittests/Support/BinaryStreamTest.cpp16
-rw-r--r--llvm/unittests/Support/Casting.cpp6
-rw-r--r--llvm/unittests/Support/FileCheckTest.cpp12
-rw-r--r--llvm/unittests/Support/Host.cpp2
-rw-r--r--llvm/unittests/Support/TrigramIndexTest.cpp2
-rw-r--r--llvm/unittests/Support/YAMLIOTest.cpp20
6 files changed, 29 insertions, 29 deletions
diff --git a/llvm/unittests/Support/BinaryStreamTest.cpp b/llvm/unittests/Support/BinaryStreamTest.cpp
index 5291a31013c..6d6ecc45c90 100644
--- a/llvm/unittests/Support/BinaryStreamTest.cpp
+++ b/llvm/unittests/Support/BinaryStreamTest.cpp
@@ -144,8 +144,8 @@ protected:
for (uint32_t I = 0; I < NumEndians; ++I) {
auto InByteStream =
- llvm::make_unique<BinaryByteStream>(InputData, Endians[I]);
- auto InBrokenStream = llvm::make_unique<BrokenStream>(
+ std::make_unique<BinaryByteStream>(InputData, Endians[I]);
+ auto InBrokenStream = std::make_unique<BrokenStream>(
BrokenInputData, Endians[I], Align);
Streams[I * 2].Input = std::move(InByteStream);
@@ -159,8 +159,8 @@ protected:
for (uint32_t I = 0; I < NumEndians; ++I) {
Streams[I * 2].Output =
- llvm::make_unique<MutableBinaryByteStream>(OutputData, Endians[I]);
- Streams[I * 2 + 1].Output = llvm::make_unique<BrokenStream>(
+ std::make_unique<MutableBinaryByteStream>(OutputData, Endians[I]);
+ Streams[I * 2 + 1].Output = std::make_unique<BrokenStream>(
BrokenOutputData, Endians[I], Align);
}
}
@@ -168,8 +168,8 @@ protected:
void initializeOutputFromInput(uint32_t Align) {
for (uint32_t I = 0; I < NumEndians; ++I) {
Streams[I * 2].Output =
- llvm::make_unique<MutableBinaryByteStream>(InputData, Endians[I]);
- Streams[I * 2 + 1].Output = llvm::make_unique<BrokenStream>(
+ std::make_unique<MutableBinaryByteStream>(InputData, Endians[I]);
+ Streams[I * 2 + 1].Output = std::make_unique<BrokenStream>(
BrokenInputData, Endians[I], Align);
}
}
@@ -177,8 +177,8 @@ protected:
void initializeInputFromOutput(uint32_t Align) {
for (uint32_t I = 0; I < NumEndians; ++I) {
Streams[I * 2].Input =
- llvm::make_unique<BinaryByteStream>(OutputData, Endians[I]);
- Streams[I * 2 + 1].Input = llvm::make_unique<BrokenStream>(
+ std::make_unique<BinaryByteStream>(OutputData, Endians[I]);
+ Streams[I * 2 + 1].Input = std::make_unique<BrokenStream>(
BrokenOutputData, Endians[I], Align);
}
}
diff --git a/llvm/unittests/Support/Casting.cpp b/llvm/unittests/Support/Casting.cpp
index bcdaca94a3c..a196fc2ec5e 100644
--- a/llvm/unittests/Support/Casting.cpp
+++ b/llvm/unittests/Support/Casting.cpp
@@ -193,12 +193,12 @@ TEST(CastingTest, dyn_cast_or_null) {
EXPECT_NE(F5, null_foo);
}
-std::unique_ptr<derived> newd() { return llvm::make_unique<derived>(); }
-std::unique_ptr<base> newb() { return llvm::make_unique<derived>(); }
+std::unique_ptr<derived> newd() { return std::make_unique<derived>(); }
+std::unique_ptr<base> newb() { return std::make_unique<derived>(); }
TEST(CastingTest, unique_dyn_cast) {
derived *OrigD = nullptr;
- auto D = llvm::make_unique<derived>();
+ auto D = std::make_unique<derived>();
OrigD = D.get();
// Converting from D to itself is valid, it should return a new unique_ptr
diff --git a/llvm/unittests/Support/FileCheckTest.cpp b/llvm/unittests/Support/FileCheckTest.cpp
index d85690d633b..375f8960c10 100644
--- a/llvm/unittests/Support/FileCheckTest.cpp
+++ b/llvm/unittests/Support/FileCheckTest.cpp
@@ -87,9 +87,9 @@ TEST_F(FileCheckTest, NumericVariable) {
// returns true, getValue and eval return value of expression, setValue
// clears expression.
std::unique_ptr<FileCheckNumericVariableUse> FooVarUsePtr =
- llvm::make_unique<FileCheckNumericVariableUse>("FOO", &FooVar);
+ std::make_unique<FileCheckNumericVariableUse>("FOO", &FooVar);
std::unique_ptr<FileCheckExpressionLiteral> One =
- llvm::make_unique<FileCheckExpressionLiteral>(1);
+ std::make_unique<FileCheckExpressionLiteral>(1);
FileCheckASTBinop Binop =
FileCheckASTBinop(doAdd, std::move(FooVarUsePtr), std::move(One));
FileCheckNumericVariable FoobarExprVar =
@@ -126,11 +126,11 @@ TEST_F(FileCheckTest, Binop) {
FileCheckNumericVariable FooVar = FileCheckNumericVariable("FOO", 1);
FooVar.setValue(42);
std::unique_ptr<FileCheckNumericVariableUse> FooVarUse =
- llvm::make_unique<FileCheckNumericVariableUse>("FOO", &FooVar);
+ std::make_unique<FileCheckNumericVariableUse>("FOO", &FooVar);
FileCheckNumericVariable BarVar = FileCheckNumericVariable("BAR", 2);
BarVar.setValue(18);
std::unique_ptr<FileCheckNumericVariableUse> BarVarUse =
- llvm::make_unique<FileCheckNumericVariableUse>("BAR", &BarVar);
+ std::make_unique<FileCheckNumericVariableUse>("BAR", &BarVar);
FileCheckASTBinop Binop =
FileCheckASTBinop(doAdd, std::move(FooVarUse), std::move(BarVarUse));
@@ -453,8 +453,8 @@ TEST_F(FileCheckTest, Substitution) {
LineVar.setValue(42);
NVar.setValue(10);
auto LineVarUse =
- llvm::make_unique<FileCheckNumericVariableUse>("@LINE", &LineVar);
- auto NVarUse = llvm::make_unique<FileCheckNumericVariableUse>("N", &NVar);
+ std::make_unique<FileCheckNumericVariableUse>("@LINE", &LineVar);
+ auto NVarUse = std::make_unique<FileCheckNumericVariableUse>("N", &NVar);
FileCheckNumericSubstitution SubstitutionLine = FileCheckNumericSubstitution(
&Context, "@LINE", std::move(LineVarUse), 12);
FileCheckNumericSubstitution SubstitutionN =
diff --git a/llvm/unittests/Support/Host.cpp b/llvm/unittests/Support/Host.cpp
index ec9dd951a9f..4562d933df7 100644
--- a/llvm/unittests/Support/Host.cpp
+++ b/llvm/unittests/Support/Host.cpp
@@ -273,7 +273,7 @@ static bool runAndGetCommandOutput(
Size = ::lseek(FD, 0, SEEK_END);
ASSERT_NE(-1, Size);
::lseek(FD, 0, SEEK_SET);
- Buffer = llvm::make_unique<char[]>(Size);
+ Buffer = std::make_unique<char[]>(Size);
ASSERT_EQ(::read(FD, Buffer.get(), Size), Size);
::close(FD);
diff --git a/llvm/unittests/Support/TrigramIndexTest.cpp b/llvm/unittests/Support/TrigramIndexTest.cpp
index 9b10daa86e8..42b3fcdbd53 100644
--- a/llvm/unittests/Support/TrigramIndexTest.cpp
+++ b/llvm/unittests/Support/TrigramIndexTest.cpp
@@ -22,7 +22,7 @@ protected:
std::unique_ptr<TrigramIndex> makeTrigramIndex(
std::vector<std::string> Rules) {
std::unique_ptr<TrigramIndex> TI =
- make_unique<TrigramIndex>();
+ std::make_unique<TrigramIndex>();
for (auto &Rule : Rules)
TI->insert(Rule);
return TI;
diff --git a/llvm/unittests/Support/YAMLIOTest.cpp b/llvm/unittests/Support/YAMLIOTest.cpp
index e02f68f2ace..0c9df117031 100644
--- a/llvm/unittests/Support/YAMLIOTest.cpp
+++ b/llvm/unittests/Support/YAMLIOTest.cpp
@@ -2841,19 +2841,19 @@ template <> struct PolymorphicTraits<std::unique_ptr<Poly>> {
static Scalar &getAsScalar(std::unique_ptr<Poly> &N) {
if (!N || !isa<Scalar>(*N))
- N = llvm::make_unique<Scalar>();
+ N = std::make_unique<Scalar>();
return *cast<Scalar>(N.get());
}
static Seq &getAsSequence(std::unique_ptr<Poly> &N) {
if (!N || !isa<Seq>(*N))
- N = llvm::make_unique<Seq>();
+ N = std::make_unique<Seq>();
return *cast<Seq>(N.get());
}
static Map &getAsMap(std::unique_ptr<Poly> &N) {
if (!N || !isa<Map>(*N))
- N = llvm::make_unique<Map>();
+ N = std::make_unique<Map>();
return *cast<Map>(N.get());
}
};
@@ -2932,7 +2932,7 @@ template <> struct SequenceTraits<Seq> {
TEST(YAMLIO, TestReadWritePolymorphicScalar) {
std::string intermediate;
- std::unique_ptr<Poly> node = llvm::make_unique<Scalar>(true);
+ std::unique_ptr<Poly> node = std::make_unique<Scalar>(true);
llvm::raw_string_ostream ostr(intermediate);
Output yout(ostr);
@@ -2946,9 +2946,9 @@ TEST(YAMLIO, TestReadWritePolymorphicScalar) {
TEST(YAMLIO, TestReadWritePolymorphicSeq) {
std::string intermediate;
{
- auto seq = llvm::make_unique<Seq>();
- seq->push_back(llvm::make_unique<Scalar>(true));
- seq->push_back(llvm::make_unique<Scalar>(1.0));
+ auto seq = std::make_unique<Seq>();
+ seq->push_back(std::make_unique<Scalar>(true));
+ seq->push_back(std::make_unique<Scalar>(1.0));
auto node = llvm::unique_dyn_cast<Poly>(seq);
llvm::raw_string_ostream ostr(intermediate);
@@ -2978,9 +2978,9 @@ TEST(YAMLIO, TestReadWritePolymorphicSeq) {
TEST(YAMLIO, TestReadWritePolymorphicMap) {
std::string intermediate;
{
- auto map = llvm::make_unique<Map>();
- (*map)["foo"] = llvm::make_unique<Scalar>(false);
- (*map)["bar"] = llvm::make_unique<Scalar>(2.0);
+ auto map = std::make_unique<Map>();
+ (*map)["foo"] = std::make_unique<Scalar>(false);
+ (*map)["bar"] = std::make_unique<Scalar>(2.0);
std::unique_ptr<Poly> node = llvm::unique_dyn_cast<Poly>(map);
llvm::raw_string_ostream ostr(intermediate);
OpenPOWER on IntegriCloud