https://github.com/ilovepi updated 
https://github.com/llvm/llvm-project/pull/86609

>From 7760282ed8dba340d6873d06ff4c18c6efc25b56 Mon Sep 17 00:00:00 2001
From: Paul Kirth <paulki...@google.com>
Date: Thu, 6 Jun 2024 19:04:19 +0000
Subject: [PATCH] Add assert for metadata string value

Created using spr 1.3.4
---
 llvm/lib/IR/ProfDataUtils.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/llvm/lib/IR/ProfDataUtils.cpp b/llvm/lib/IR/ProfDataUtils.cpp
index f738d76937c24..af536d2110eac 100644
--- a/llvm/lib/IR/ProfDataUtils.cpp
+++ b/llvm/lib/IR/ProfDataUtils.cpp
@@ -133,6 +133,7 @@ bool hasBranchWeightProvenance(const MDNode *ProfileData) {
   // NOTE: if we ever have more types of branch weight provenance,
   // we need to check the string value is "expected". For now, we
   // supply a more generic API, and avoid the spurious comparisons.
+  assert(ProfDataName->getString() == "expected");
   return ProfDataName;
 }
 

_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to