[llvm] [llvm/llvm-project][Coroutines] Improve debugging and minor refactoring (PR #104642)

Tyler Nowicki via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 10:41:51 PDT 2024


================
@@ -52,6 +53,16 @@ extern cl::opt<bool> UseNewDbgInfoFormat;
 
 enum { SmallVectorThreshold = 32 };
 
+static std::string getBasicBlockLabel(const BasicBlock *BB) {
+  if (BB->hasName())
+    return BB->getName().str();
----------------
TylerNowicki wrote:

If we just use BB->printAsOperand(dbgs(), false) we can remove this need to go to a string. But that would result in a % being printed before the BB label. I find that a bit confusing because BB labels are not otherwise printed with a preceding %.

https://github.com/llvm/llvm-project/pull/104642


More information about the llvm-commits mailing list