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/lib/IR/Function.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/lib/IR/Function.cpp')
-rw-r--r-- | llvm/lib/IR/Function.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp index 3f73502..9360e6d 100644 --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -83,6 +83,8 @@ static cl::opt<int> NonGlobalValueMaxNameSize( "non-global-value-max-name-size", cl::Hidden, cl::init(1024), cl::desc("Maximum size for the name of non-global values.")); +extern cl::opt<bool> UseNewDbgInfoFormat; + void Function::convertToNewDbgValues() { IsNewDbgInfoFormat = true; for (auto &BB : *this) { @@ -441,7 +443,7 @@ Function::Function(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace, : GlobalObject(Ty, Value::FunctionVal, OperandTraits<Function>::op_begin(this), 0, Linkage, name, computeAddrSpace(AddrSpace, ParentModule)), - NumArgs(Ty->getNumParams()), IsNewDbgInfoFormat(false) { + NumArgs(Ty->getNumParams()), IsNewDbgInfoFormat(UseNewDbgInfoFormat) { assert(FunctionType::isValidReturnType(getReturnType()) && "invalid return type"); setGlobalObjectSubClassData(0); |