<div dir="ltr">Fair enough :/ I worry about those sort of things, but cest la vie.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 24, 2022 at 5:40 PM Adrian Prantl <<a href="mailto:aprantl@apple.com">aprantl@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">We got the following diagnostic:<div><br></div><div><pre style="box-sizing:inherit;margin-top:4px;margin-bottom:4px;padding:8px;line-height:1.50001;font-variant-ligatures:none;white-space:pre-wrap;word-break:normal;border-radius:4px;color:rgb(29,28,29);font-family:Monaco,Menlo,Consolas,"Courier New",monospace">/Volumes/Data/llvm-project/llvm/include/llvm/IR/Argument.h:19:10: fatal error: cyclic dependency in module 'LLVM_IR': LLVM_IR -> LLVM_intrinsic_gen -> LLVM_IR</pre><div><br></div><div><br></div><div><blockquote type="cite"><div>On Jan 23, 2022, at 7:44 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:</div><br><div><div dir="ltr">Could you explain a bit more about how this broke the modules build?<br><br>If there's some header dependency that's invalid but it's valid when defined out of line... sounds like maybe we have a layering problem?</div></div></blockquote><div><br></div><div>Possibly, I did not spend any time to investigate this further, I just made the smallest patch that get the lldb-incremental bot running again.</div><div><br></div><div>-- adrian</div><br><blockquote type="cite"><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 19, 2022 at 3:34 PM Adrian Prantl via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Author: Adrian Prantl<br>
Date: 2022-01-19T15:33:59-08:00<br>
New Revision: 24bc072edb5b157dd3ee3a7f17214ff831ea2b5c<br>
<br>
URL: <a href="https://github.com/llvm/llvm-project/commit/24bc072edb5b157dd3ee3a7f17214ff831ea2b5c" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/24bc072edb5b157dd3ee3a7f17214ff831ea2b5c</a><br>
DIFF: <a href="https://github.com/llvm/llvm-project/commit/24bc072edb5b157dd3ee3a7f17214ff831ea2b5c.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/24bc072edb5b157dd3ee3a7f17214ff831ea2b5c.diff</a><br>
<br>
LOG: Fix modules build by moving implementation into .cpp file<br>
<br>
Added: <br>
<br>
<br>
Modified: <br>
    llvm/include/llvm/IR/DIBuilder.h<br>
    llvm/lib/IR/DIBuilder.cpp<br>
<br>
Removed: <br>
<br>
<br>
<br>
################################################################################<br>
diff  --git a/llvm/include/llvm/IR/DIBuilder.h b/llvm/include/llvm/IR/DIBuilder.h<br>
index 61885c4de923a..f36c9e620d430 100644<br>
--- a/llvm/include/llvm/IR/DIBuilder.h<br>
+++ b/llvm/include/llvm/IR/DIBuilder.h<br>
@@ -23,7 +23,6 @@<br>
 #include "llvm/ADT/StringRef.h"<br>
 #include "llvm/IR/DebugInfo.h"<br>
 #include "llvm/IR/DebugInfoMetadata.h"<br>
-#include "llvm/IR/Intrinsics.h"<br>
 #include "llvm/IR/TrackingMDRef.h"<br>
 #include "llvm/Support/Casting.h"<br>
 #include <algorithm><br>
@@ -99,23 +98,13 @@ namespace llvm {<br>
     Instruction *<br>
     insertDbgValueIntrinsic(llvm::Value *Val, DILocalVariable *VarInfo,<br>
                             DIExpression *Expr, const DILocation *DL,<br>
-                            BasicBlock *InsertBB, Instruction *InsertBefore) {<br>
-      if (!ValueFn)<br>
-        ValueFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_value);<br>
-      return insertDbgIntrinsic(ValueFn, Val, VarInfo, Expr, DL, InsertBB,<br>
-                                InsertBefore);<br>
-    }<br>
+                            BasicBlock *InsertBB, Instruction *InsertBefore);<br>
<br>
     /// Internal helper for insertDbgAddrIntrinsic.<br>
     Instruction *<br>
     insertDbgAddrIntrinsic(llvm::Value *Val, DILocalVariable *VarInfo,<br>
                            DIExpression *Expr, const DILocation *DL,<br>
-                           BasicBlock *InsertBB, Instruction *InsertBefore) {<br>
-      if (!AddrFn)<br>
-        AddrFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_addr);<br>
-      return insertDbgIntrinsic(AddrFn, Val, VarInfo, Expr, DL, InsertBB,<br>
-                                InsertBefore);<br>
-    }<br>
+                           BasicBlock *InsertBB, Instruction *InsertBefore);<br>
<br>
   public:<br>
     /// Construct a builder for a module.<br>
<br>
diff  --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp<br>
index 5712f4e9998ee..a6e84dfbe1dde 100644<br>
--- a/llvm/lib/IR/DIBuilder.cpp<br>
+++ b/llvm/lib/IR/DIBuilder.cpp<br>
@@ -1013,6 +1013,24 @@ static Function *getDeclareIntrin(Module &M) {<br>
                                                   : Intrinsic::dbg_declare);<br>
 }<br>
<br>
+Instruction *DIBuilder::insertDbgValueIntrinsic(<br>
+    llvm::Value *Val, DILocalVariable *VarInfo, DIExpression *Expr,<br>
+    const DILocation *DL, BasicBlock *InsertBB, Instruction *InsertBefore) {<br>
+  if (!ValueFn)<br>
+    ValueFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_value);<br>
+  return insertDbgIntrinsic(ValueFn, Val, VarInfo, Expr, DL, InsertBB,<br>
+                            InsertBefore);<br>
+}<br>
+<br>
+Instruction *DIBuilder::insertDbgAddrIntrinsic(<br>
+    llvm::Value *Val, DILocalVariable *VarInfo, DIExpression *Expr,<br>
+    const DILocation *DL, BasicBlock *InsertBB, Instruction *InsertBefore) {<br>
+  if (!AddrFn)<br>
+    AddrFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_addr);<br>
+  return insertDbgIntrinsic(AddrFn, Val, VarInfo, Expr, DL, InsertBB,<br>
+                            InsertBefore);<br>
+}<br>
+<br>
 Instruction *DIBuilder::insertDeclare(Value *Storage, DILocalVariable *VarInfo,<br>
                                       DIExpression *Expr, const DILocation *DL,<br>
                                       BasicBlock *InsertBB,<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>
</div></blockquote></div><br></div></div></blockquote></div>