From b5630dbadf9a2a06754194387d6b0fd9962a67f1 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 22 May 2017 19:43:28 +0000 Subject: Vendor import of llvm trunk r303571: https://llvm.org/svn/llvm-project/llvm/trunk@303571 --- unittests/IR/ConstantsTest.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'unittests/IR/ConstantsTest.cpp') diff --git a/unittests/IR/ConstantsTest.cpp b/unittests/IR/ConstantsTest.cpp index 6959ac85e49d0..7a8a3045a0d49 100644 --- a/unittests/IR/ConstantsTest.cpp +++ b/unittests/IR/ConstantsTest.cpp @@ -178,14 +178,15 @@ TEST(ConstantsTest, PointerCast) { ConstantExpr::getAddrSpaceCast(NullInt32Ptr1, Int32PtrTy)); } -#define CHECK(x, y) { \ - std::string __s; \ - raw_string_ostream __o(__s); \ - Instruction *__I = cast(x)->getAsInstruction(); \ - __I->print(__o); \ - delete __I; \ - __o.flush(); \ - EXPECT_EQ(std::string(" = " y), __s); \ +#define CHECK(x, y) \ + { \ + std::string __s; \ + raw_string_ostream __o(__s); \ + Instruction *__I = cast(x)->getAsInstruction(); \ + __I->print(__o); \ + __I->deleteValue(); \ + __o.flush(); \ + EXPECT_EQ(std::string(" = " y), __s); \ } TEST(ConstantsTest, AsInstructionsTest) { -- cgit v1.2.3