[llvm] [LFI][NFC] Style cleanup for MCLFI (PR #228304)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 1 19:00:07 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-mc
Author: Zachary Yedidia (zyedidia)
<details>
<summary>Changes</summary>
Follow-up to address review comments on #<!-- -->214111.
---
Full diff: https://github.com/llvm/llvm-project/pull/228304.diff
1 Files Affected:
- (modified) llvm/lib/MC/MCLFI.cpp (+10-12)
``````````diff
diff --git a/llvm/lib/MC/MCLFI.cpp b/llvm/lib/MC/MCLFI.cpp
index baa9e04bf808e..ddc2ad9338523 100644
--- a/llvm/lib/MC/MCLFI.cpp
+++ b/llvm/lib/MC/MCLFI.cpp
@@ -24,18 +24,18 @@
#include "llvm/Support/CommandLine.h"
#include "llvm/TargetParser/Triple.h"
-static const char NoteNamespace[] = "LFI";
+using namespace llvm;
-static constexpr unsigned X86BundleSize = 32;
+const char NoteNamespace[] = "LFI";
-namespace llvm {
+constexpr unsigned X86BundleSize = 32;
-cl::opt<bool> FlagEnableRewriting("lfi-enable-rewriter",
- cl::desc("Enable rewriting for LFI."),
- cl::init(true), cl::Hidden);
+static cl::opt<bool> FlagEnableRewriting("lfi-enable-rewriter",
+ cl::desc("Enable rewriting for LFI."),
+ cl::init(true), cl::Hidden);
-void initializeLFIMCStreamer(MCStreamer &Streamer, MCContext &Ctx,
- const Triple &TheTriple) {
+void llvm::initializeLFIMCStreamer(MCStreamer &Streamer, MCContext &Ctx,
+ const Triple &TheTriple) {
assert(TheTriple.isLFI());
std::string Error;
@@ -52,7 +52,7 @@ void initializeLFIMCStreamer(MCStreamer &Streamer, MCContext &Ctx,
}
}
-void emitLFIBundleAlign(MCStreamer &Streamer, MCContext &Ctx) {
+void llvm::emitLFIBundleAlign(MCStreamer &Streamer, MCContext &Ctx) {
const Triple &TheTriple = Ctx.getTargetTriple();
assert(TheTriple.isLFI());
@@ -60,7 +60,7 @@ void emitLFIBundleAlign(MCStreamer &Streamer, MCContext &Ctx) {
Streamer.emitBundleAlignMode(Align(X86BundleSize));
}
-void emitLFINoteSection(MCStreamer &Streamer, MCContext &Ctx) {
+void llvm::emitLFINoteSection(MCStreamer &Streamer, MCContext &Ctx) {
const Triple &TheTriple = Ctx.getTargetTriple();
assert(TheTriple.isLFI());
@@ -96,5 +96,3 @@ void emitLFINoteSection(MCStreamer &Streamer, MCContext &Ctx) {
Streamer.emitIntValue(0, 1); // NUL terminator
Streamer.emitValueToAlignment(Align(4));
}
-
-} // namespace llvm
``````````
</details>
https://github.com/llvm/llvm-project/pull/228304
More information about the llvm-commits
mailing list