[llvm] llvm: Add LLVM_ABI annotations in AsmParserContext (PR #176789)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 19 10:01:44 PST 2026


github-actions[bot] wrote:

<!--LLVM IDS CHECK COMMENT-->


:warning: LLVM ABI annotation checker, ids-check found issues in your code. :warning:

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

``````````bash
git diff origin/main HEAD -- 'llvm/include/llvm/**/*.h' 'llvm/include/llvm-c/**/*.h' 'llvm/include/llvm/Demangle/**/*.h'
Then run idt on the changed files with appropriate --export-macro and --include-header flags.
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from ids-check here.
</summary>

``````````diff
diff --git a/llvm/include/llvm/AsmParser/AsmParserContext.h b/llvm/include/llvm/AsmParser/AsmParserContext.h
index eb14bd7e9..fba6ecf3a 100644
--- a/llvm/include/llvm/AsmParser/AsmParserContext.h
+++ b/llvm/include/llvm/AsmParser/AsmParserContext.h
@@ -9,6 +9,7 @@
 #ifndef LLVM_ASMPARSER_ASMPARSERCONTEXT_H
 #define LLVM_ASMPARSER_ASMPARSERCONTEXT_H
 
+#include "llvm/Support/Compiler.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/IntervalMap.h"
 #include "llvm/AsmParser/FileLoc.h"
@@ -85,9 +86,9 @@ public:
   /// If no instruction occupies the queried location, or the record is missing,
   /// a nullptr is returned.
   LLVM_ABI Instruction *getInstructionAtLocation(const FileLoc &) const;
-  bool addFunctionLocation(Function *, const FileLocRange &);
-  bool addBlockLocation(BasicBlock *, const FileLocRange &);
-  bool addInstructionLocation(Instruction *, const FileLocRange &);
+  LLVM_ABI bool addFunctionLocation(Function *, const FileLocRange &);
+  LLVM_ABI bool addBlockLocation(BasicBlock *, const FileLocRange &);
+  LLVM_ABI bool addInstructionLocation(Instruction *, const FileLocRange &);
 };
 } // namespace llvm
 

``````````

</details>


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


More information about the llvm-commits mailing list