diff options
author | Stephen Tozer <stephen.tozer@sony.com> | 2024-06-13 17:21:24 +0100 |
---|---|---|
committer | Stephen Tozer <stephen.tozer@sony.com> | 2024-06-14 09:54:56 +0100 |
commit | dc726c340392d4a0f3af9dde5f34c58d98198667 (patch) | |
tree | ec5095266219e970778ec5632875bbe3b5e1fabe /llvm/unittests/IR/InstructionsTest.cpp | |
parent | b422fa6b62160f5eeb038d816d05e039182dde56 (diff) | |
download | llvm-dc726c340392d4a0f3af9dde5f34c58d98198667.zip llvm-dc726c340392d4a0f3af9dde5f34c58d98198667.tar.gz llvm-dc726c340392d4a0f3af9dde5f34c58d98198667.tar.bz2 |
Reapply#4 "[RemoveDIs] Load into new debug info format by default in LLVM (#89799)"
Reapplies commit c5aeca73 (and its followup commit 21396be8), which were
reverted due to missing functionality in MLIR and Flang regarding printing
debug records. This has now been added in commit 08aa511, along with support
for printing debug records in flang.
This reverts commit 2dc2290860355dd2bac3b655eea895fe30fde257.
Diffstat (limited to 'llvm/unittests/IR/InstructionsTest.cpp')
-rw-r--r-- | llvm/unittests/IR/InstructionsTest.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/unittests/IR/InstructionsTest.cpp b/llvm/unittests/IR/InstructionsTest.cpp index b47c73f..b6044b2 100644 --- a/llvm/unittests/IR/InstructionsTest.cpp +++ b/llvm/unittests/IR/InstructionsTest.cpp @@ -25,12 +25,15 @@ #include "llvm/IR/Module.h" #include "llvm/IR/NoFolder.h" #include "llvm/IR/Operator.h" +#include "llvm/Support/CommandLine.h" #include "llvm/Support/SourceMgr.h" #include "llvm-c/Core.h" #include "gmock/gmock-matchers.h" #include "gtest/gtest.h" #include <memory> +extern llvm::cl::opt<bool> UseNewDbgInfoFormat; + namespace llvm { namespace { @@ -1460,6 +1463,8 @@ TEST(InstructionsTest, GetSplat) { TEST(InstructionsTest, SkipDebug) { LLVMContext C; + bool OldDbgValueMode = UseNewDbgInfoFormat; + UseNewDbgInfoFormat = false; std::unique_ptr<Module> M = parseIR(C, R"( declare void @llvm.dbg.value(metadata, metadata, metadata) @@ -1495,6 +1500,7 @@ TEST(InstructionsTest, SkipDebug) { // After the terminator, there are no non-debug instructions. EXPECT_EQ(nullptr, Term->getNextNonDebugInstruction()); + UseNewDbgInfoFormat = OldDbgValueMode; } TEST(InstructionsTest, PhiMightNotBeFPMathOperator) { |