[clang] [clang][bytecode][NFC] Enfore internal linkage (PR #213208)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 30 23:01:31 PDT 2026
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/213208
>From a8b5ec04c95b4f81002431b7ce8c0eb62e54e5c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Fri, 31 Jul 2026 07:55:48 +0200
Subject: [PATCH] [clang][bytecode][NFC] Enfore internal linkage
---
clang/lib/AST/ByteCode/Interp.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/clang/lib/AST/ByteCode/Interp.cpp b/clang/lib/AST/ByteCode/Interp.cpp
index 23bdc5ea28c03..5e76d90daff84 100644
--- a/clang/lib/AST/ByteCode/Interp.cpp
+++ b/clang/lib/AST/ByteCode/Interp.cpp
@@ -2061,6 +2061,7 @@ static bool getDynamicDecl(InterpState &S, CodePtr OpPC, PtrView TypePtr,
return DynamicDecl != nullptr;
}
+namespace {
struct DynamicCastResult {
UnsignedOrNone Offset = std::nullopt;
bool Ambiguous = false;
@@ -2085,6 +2086,7 @@ struct DynamicCastResult {
}
}
};
+} // namespace
// Walk UP the type hierarchy, starting at the decl of R to find Needle.
static DynamicCastResult findRecordBase(const ASTContext &Ctx, const Record *R,
@@ -3220,7 +3222,7 @@ bool CastFloatingIntegralAPS(InterpState &S, CodePtr OpPC, uint32_t BitWidth,
}
// FIXME: Would be nice to generate this instead of hardcoding it here.
-constexpr bool OpReturns(Opcode Op) {
+[[maybe_unused]] static constexpr bool OpReturns(Opcode Op) {
return Op == OP_RetVoid || Op == OP_RetValue || Op == OP_NoRet ||
Op == OP_RetSint8 || Op == OP_RetUint8 || Op == OP_RetSint16 ||
Op == OP_RetUint16 || Op == OP_RetSint32 || Op == OP_RetUint32 ||
More information about the cfe-commits
mailing list