aboutsummaryrefslogtreecommitdiffstats
path: root/unittests/IR/UseTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/IR/UseTest.cpp')
-rw-r--r--unittests/IR/UseTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/unittests/IR/UseTest.cpp b/unittests/IR/UseTest.cpp
index 3f33ca6..d9d20af 100644
--- a/unittests/IR/UseTest.cpp
+++ b/unittests/IR/UseTest.cpp
@@ -9,10 +9,10 @@
#include "llvm/AsmParser/Parser.h"
#include "llvm/IR/Function.h"
+#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/User.h"
-#include "llvm/IR/Instructions.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/SourceMgr.h"
#include "gtest/gtest.h"
@@ -50,7 +50,7 @@ TEST(UseTest, sort) {
});
unsigned I = 0;
for (User *U : X.users()) {
- snprintf(vnbuf, sizeof(vnbuf), "v%u", I++);
+ format("v%u", I++).snprint(vnbuf, sizeof(vnbuf));
EXPECT_EQ(vnbuf, U->getName());
}
ASSERT_EQ(8u, I);
@@ -60,7 +60,7 @@ TEST(UseTest, sort) {
});
I = 0;
for (User *U : X.users()) {
- snprintf(vnbuf, sizeof(vnbuf), "v%u", (7 - I++));
+ format("v%u", (7 - I++)).snprint(vnbuf, sizeof(vnbuf));
EXPECT_EQ(vnbuf, U->getName());
}
ASSERT_EQ(8u, I);
@@ -95,7 +95,7 @@ TEST(UseTest, reverse) {
});
unsigned I = 0;
for (User *U : X.users()) {
- snprintf(vnbuf, sizeof(vnbuf), "v%u", I++);
+ format("v%u", I++).snprint(vnbuf, sizeof(vnbuf));
EXPECT_EQ(vnbuf, U->getName());
}
ASSERT_EQ(8u, I);
@@ -103,7 +103,7 @@ TEST(UseTest, reverse) {
X.reverseUseList();
I = 0;
for (User *U : X.users()) {
- snprintf(vnbuf, sizeof(vnbuf), "v%u", (7 - I++));
+ format("v%u", (7 - I++)).snprint(vnbuf, sizeof(vnbuf));
EXPECT_EQ(vnbuf, U->getName());
}
ASSERT_EQ(8u, I);