[llvm] llvm-profgen: Avoid "using namespace" in headers (PR #147631)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 8 18:07:50 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp,h -- llvm/tools/llvm-profgen/CSPreInliner.h llvm/tools/llvm-profgen/ErrorHandling.h llvm/tools/llvm-profgen/PerfReader.cpp llvm/tools/llvm-profgen/PerfReader.h llvm/tools/llvm-profgen/ProfileGenerator.cpp llvm/tools/llvm-profgen/ProfileGenerator.h llvm/tools/llvm-profgen/ProfiledBinary.cpp llvm/tools/llvm-profgen/ProfiledBinary.h llvm/tools/llvm-profgen/llvm-profgen.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/tools/llvm-profgen/ProfiledBinary.h b/llvm/tools/llvm-profgen/ProfiledBinary.h
index fd2fa5301..5b35c040b 100644
--- a/llvm/tools/llvm-profgen/ProfiledBinary.h
+++ b/llvm/tools/llvm-profgen/ProfiledBinary.h
@@ -310,9 +310,9 @@ class ProfiledBinary {
 
   void decodePseudoProbe(const object::ELFObjectFileBase *Obj);
 
-  void
-  checkUseFSDiscriminator(const object::ObjectFile *Obj,
-                          std::map<object::SectionRef, SectionSymbolsTy> &AllSymbols);
+  void checkUseFSDiscriminator(
+      const object::ObjectFile *Obj,
+      std::map<object::SectionRef, SectionSymbolsTy> &AllSymbols);
 
   // Set up disassembler and related components.
   void setUpDisassembler(const object::ObjectFile *Obj);
@@ -340,7 +340,8 @@ class ProfiledBinary {
 
   /// Helper function to dissassemble the symbol and extract info for unwinding
   bool dissassembleSymbol(std::size_t SI, ArrayRef<uint8_t> Bytes,
-                          SectionSymbolsTy &Symbols, const object::SectionRef &Section);
+                          SectionSymbolsTy &Symbols,
+                          const object::SectionRef &Section);
   /// Symbolize a given instruction pointer and return a full call context.
   SampleContextFrameVector symbolize(const InstructionPointer &IP,
                                      bool UseCanonicalFnName = false,

``````````

</details>


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


More information about the llvm-commits mailing list