aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Value.cpp
diff options
context:
space:
mode:
authorAllin Lee <60502081+AllinLeeYL@users.noreply.github.com>2025-04-23 16:29:06 +0800
committerGitHub <noreply@github.com>2025-04-23 09:29:06 +0100
commit8a57df6a5210d0c54ed482eb7230b7689a1f9cb9 (patch)
tree06f8444af2c2fddce95593fd3e87ef2fc21d62e8 /llvm/lib/IR/Value.cpp
parent91edbe223177504cf878340f37a36dfcee349cab (diff)
downloadllvm-8a57df6a5210d0c54ed482eb7230b7689a1f9cb9.zip
llvm-8a57df6a5210d0c54ed482eb7230b7689a1f9cb9.tar.gz
llvm-8a57df6a5210d0c54ed482eb7230b7689a1f9cb9.tar.bz2
[llvm-extract] support unnamed bbs. (#135140)
Dear developer: I have recently working with LLVM IR and I want to isolate basic blocks using the command "llvm-extract". However, I found that the command option "llvm-extract --bb func_name:bb_name" will only function when dumping source code into IRs with options "-fno-discard-value-names". That is to say, the "llvm-extract" command cannot support unnamed basic blocks, which is a default output of the compiler. So, I made these changes and hope they will make LLVM better. Best regards, Co-authored-by: Yilin Li <allinleeme@gmail.com>
Diffstat (limited to 'llvm/lib/IR/Value.cpp')
-rw-r--r--llvm/lib/IR/Value.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/lib/IR/Value.cpp b/llvm/lib/IR/Value.cpp
index 0eaf75b..aa97b70 100644
--- a/llvm/lib/IR/Value.cpp
+++ b/llvm/lib/IR/Value.cpp
@@ -441,7 +441,6 @@ void Value::takeName(Value *V) {
ST->reinsertValue(this);
}
-#ifndef NDEBUG
std::string Value::getNameOrAsOperand() const {
if (!getName().empty())
return std::string(getName());
@@ -451,7 +450,6 @@ std::string Value::getNameOrAsOperand() const {
printAsOperand(OS, false);
return OS.str();
}
-#endif
void Value::assertModuleIsMaterializedImpl() const {
#ifndef NDEBUG