llvm.org GIT mirror llvm / 6bf3e46
IRTests/ConstantsTest.cpp: AsInstructionsTest: Delete each instruction immediately if it is not linked. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173236 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 6 years ago
1 changed file(s) with 8 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
150150 Constant::getNullValue(Int8PtrVecTy), Int32PtrVecTy));
151151 }
152152
153 #define CHECK(x, y) { \
154 std::string __s; \
155 raw_string_ostream __o(__s); \
156 cast(x)->getAsInstruction()->print(__o); \
157 __o.flush(); \
158 EXPECT_EQ(std::string(" = " y), __s); \
153 #define CHECK(x, y) { \
154 std::string __s; \
155 raw_string_ostream __o(__s); \
156 Instruction *__I = cast(x)->getAsInstruction(); \
157 __I->print(__o); \
158 delete __I; \
159 __o.flush(); \
160 EXPECT_EQ(std::string(" = " y), __s); \
159161 }
160162
161163 TEST(ConstantsTest, AsInstructionsTest) {