diff options
Diffstat (limited to 'llvm/unittests/IR/InstructionsTest.cpp')
-rw-r--r-- | llvm/unittests/IR/InstructionsTest.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/unittests/IR/InstructionsTest.cpp b/llvm/unittests/IR/InstructionsTest.cpp index b47c73f..6c4debf 100644 --- a/llvm/unittests/IR/InstructionsTest.cpp +++ b/llvm/unittests/IR/InstructionsTest.cpp @@ -31,6 +31,8 @@ #include "gtest/gtest.h" #include <memory> +extern llvm::cl::opt<llvm::cl::boolOrDefault> PreserveInputDbgFormat; + namespace llvm { namespace { @@ -1460,6 +1462,8 @@ TEST(InstructionsTest, GetSplat) { TEST(InstructionsTest, SkipDebug) { LLVMContext C; + cl::boolOrDefault OldDbgFormat = PreserveInputDbgFormat; + PreserveInputDbgFormat = cl::boolOrDefault::BOU_TRUE; std::unique_ptr<Module> M = parseIR(C, R"( declare void @llvm.dbg.value(metadata, metadata, metadata) @@ -1495,6 +1499,7 @@ TEST(InstructionsTest, SkipDebug) { // After the terminator, there are no non-debug instructions. EXPECT_EQ(nullptr, Term->getNextNonDebugInstruction()); + PreserveInputDbgFormat = OldDbgFormat; } TEST(InstructionsTest, PhiMightNotBeFPMathOperator) { |