Skip to content

[NFC] mark DebugCounter::Chunk method as const #143039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

fmayer
Copy link
Contributor

@fmayer fmayer commented Jun 5, 2025

No description provided.

Created using spr 1.3.4
@fmayer fmayer added the skip-precommit-approval PR for CI feedback, not intended for review label Jun 5, 2025
Created using spr 1.3.4
@fmayer fmayer changed the title [NFC] mark DebugCounter::Chunk methods as const [NFC] mark DebugCounter::Chunk method as const Jun 5, 2025
@fmayer fmayer marked this pull request as ready for review June 5, 2025 23:54
@fmayer fmayer merged commit 16b0d2f into main Jun 5, 2025
8 checks passed
@fmayer fmayer deleted the users/fmayer/spr/nfc-mark-debugcounterchunk-methods-as-const branch June 5, 2025 23:54
@llvmbot
Copy link
Member

llvmbot commented Jun 5, 2025

@llvm/pr-subscribers-llvm-support

Author: Florian Mayer (fmayer)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/143039.diff

1 Files Affected:

  • (modified) llvm/include/llvm/Support/DebugCounter.h (+1-1)
diff --git a/llvm/include/llvm/Support/DebugCounter.h b/llvm/include/llvm/Support/DebugCounter.h
index 9611586a92c3b..89349d1ebffee 100644
--- a/llvm/include/llvm/Support/DebugCounter.h
+++ b/llvm/include/llvm/Support/DebugCounter.h
@@ -60,7 +60,7 @@ class DebugCounter {
     int64_t Begin;
     int64_t End;
     LLVM_ABI void print(llvm::raw_ostream &OS);
-    bool contains(int64_t Idx) { return Idx >= Begin && Idx <= End; }
+    bool contains(int64_t Idx) const { return Idx >= Begin && Idx <= End; }
   };
 
   LLVM_ABI static void printChunks(raw_ostream &OS, ArrayRef<Chunk>);

rorth pushed a commit to rorth/llvm-project that referenced this pull request Jun 11, 2025
DhruvSrivastavaX pushed a commit to DhruvSrivastavaX/lldb-for-aix that referenced this pull request Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
llvm:support skip-precommit-approval PR for CI feedback, not intended for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants