[llvm] [StandardInstrumentations]Add support for numeric label (PR #148844)
Jamie Schmeiser via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 2 09:23:31 PDT 2025
================
@@ -727,8 +727,13 @@ template <typename T>
template <typename FunctionT>
bool IRComparer<T>::generateFunctionData(IRDataT<T> &Data, const FunctionT &F) {
if (shouldGenerateData(F)) {
- FuncDataT<T> FD(F.front().getName().str());
int I = 0;
+ // Basic block with numberic label will be empty here.
+ std::string FDEntryBlockName = F.front().getName().str();
+ if (FDEntryBlockName.empty())
+ FDEntryBlockName = formatv("{0}", I);
+
----------------
jamieschmeiser wrote:
Don't you need to increment` I `if you use it to ensure they are unique?
https://github.com/llvm/llvm-project/pull/148844
More information about the llvm-commits
mailing list