[llvm] [IR] Fix IWYU violation (PR #93918)

Cyndy Ishida via llvm-commits llvm-commits at lists.llvm.org
Thu May 30 20:56:38 PDT 2024


https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/93918

GEPNoWrapFlags.h calls `assert` creating a undeclared identifier error when running an Apple-stage2 build with LLVM_ENABLE_MODULES enabled.

>From 85fa60413924aa2b78bceb73f75fa037b6cfb6af Mon Sep 17 00:00:00 2001
From: Cyndy Ishida <cyndy_ishida at apple.com>
Date: Thu, 30 May 2024 20:53:10 -0700
Subject: [PATCH] [IR] Fix IWYU violation

GEPNoWrapFlags.h calls `assert` creating a undeclared identifier error
when running an Apple-stage2 build with LLVM_ENABLE_MODULES enabled.
---
 llvm/include/llvm/IR/GEPNoWrapFlags.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/llvm/include/llvm/IR/GEPNoWrapFlags.h b/llvm/include/llvm/IR/GEPNoWrapFlags.h
index feaccc878de0c..4d456cc691032 100644
--- a/llvm/include/llvm/IR/GEPNoWrapFlags.h
+++ b/llvm/include/llvm/IR/GEPNoWrapFlags.h
@@ -13,6 +13,8 @@
 #ifndef LLVM_IR_GEPNOWRAPFLAGS_H
 #define LLVM_IR_GEPNOWRAPFLAGS_H
 
+#include <assert.h>
+
 namespace llvm {
 
 /// Represents flags for the getelementptr instruction/expression.



More information about the llvm-commits mailing list