[clang] [WebKit checkers] Treat asm brk as trivial (PR #155046)

Oliver Hunt via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 23 02:22:54 PDT 2025


================
@@ -666,6 +666,10 @@ class TrivialFunctionAnalysisVisitor
     return IsFunctionTrivial(Callee);
   }
 
+  bool VisitGCCAsmStmt(const GCCAsmStmt *AS) {
+    return AS->getAsmString() == "brk #0xc471";
----------------
ojhunt wrote:

does this need to be restricted to a specific brk constant, and should it include int3, and similar?

I guess it's unlikely as whitespace is usually present only in multiline asm but is it worth considering stripping white space?

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


More information about the cfe-commits mailing list