[llvm] 24bc072 - Fix modules build by moving implementation into .cpp file
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 24 17:52:24 PST 2022
Fair enough :/ I worry about those sort of things, but cest la vie.
On Mon, Jan 24, 2022 at 5:40 PM Adrian Prantl <aprantl at apple.com> wrote:
> We got the following diagnostic:
>
> /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
>
>
>
> On Jan 23, 2022, at 7:44 PM, David Blaikie <dblaikie at gmail.com> wrote:
>
> Could you explain a bit more about how this broke the modules build?
>
> 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?
>
>
> 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.
>
> -- adrian
>
>
> On Wed, Jan 19, 2022 at 3:34 PM Adrian Prantl via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>>
>> Author: Adrian Prantl
>> Date: 2022-01-19T15:33:59-08:00
>> New Revision: 24bc072edb5b157dd3ee3a7f17214ff831ea2b5c
>>
>> URL:
>> https://github.com/llvm/llvm-project/commit/24bc072edb5b157dd3ee3a7f17214ff831ea2b5c
>> DIFF:
>> https://github.com/llvm/llvm-project/commit/24bc072edb5b157dd3ee3a7f17214ff831ea2b5c.diff
>>
>> LOG: Fix modules build by moving implementation into .cpp file
>>
>> Added:
>>
>>
>> Modified:
>> llvm/include/llvm/IR/DIBuilder.h
>> llvm/lib/IR/DIBuilder.cpp
>>
>> Removed:
>>
>>
>>
>>
>> ################################################################################
>> diff --git a/llvm/include/llvm/IR/DIBuilder.h
>> b/llvm/include/llvm/IR/DIBuilder.h
>> index 61885c4de923a..f36c9e620d430 100644
>> --- a/llvm/include/llvm/IR/DIBuilder.h
>> +++ b/llvm/include/llvm/IR/DIBuilder.h
>> @@ -23,7 +23,6 @@
>> #include "llvm/ADT/StringRef.h"
>> #include "llvm/IR/DebugInfo.h"
>> #include "llvm/IR/DebugInfoMetadata.h"
>> -#include "llvm/IR/Intrinsics.h"
>> #include "llvm/IR/TrackingMDRef.h"
>> #include "llvm/Support/Casting.h"
>> #include <algorithm>
>> @@ -99,23 +98,13 @@ namespace llvm {
>> Instruction *
>> insertDbgValueIntrinsic(llvm::Value *Val, DILocalVariable *VarInfo,
>> DIExpression *Expr, const DILocation *DL,
>> - BasicBlock *InsertBB, Instruction
>> *InsertBefore) {
>> - if (!ValueFn)
>> - ValueFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_value);
>> - return insertDbgIntrinsic(ValueFn, Val, VarInfo, Expr, DL,
>> InsertBB,
>> - InsertBefore);
>> - }
>> + BasicBlock *InsertBB, Instruction
>> *InsertBefore);
>>
>> /// Internal helper for insertDbgAddrIntrinsic.
>> Instruction *
>> insertDbgAddrIntrinsic(llvm::Value *Val, DILocalVariable *VarInfo,
>> DIExpression *Expr, const DILocation *DL,
>> - BasicBlock *InsertBB, Instruction
>> *InsertBefore) {
>> - if (!AddrFn)
>> - AddrFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_addr);
>> - return insertDbgIntrinsic(AddrFn, Val, VarInfo, Expr, DL, InsertBB,
>> - InsertBefore);
>> - }
>> + BasicBlock *InsertBB, Instruction
>> *InsertBefore);
>>
>> public:
>> /// Construct a builder for a module.
>>
>> diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
>> index 5712f4e9998ee..a6e84dfbe1dde 100644
>> --- a/llvm/lib/IR/DIBuilder.cpp
>> +++ b/llvm/lib/IR/DIBuilder.cpp
>> @@ -1013,6 +1013,24 @@ static Function *getDeclareIntrin(Module &M) {
>> :
>> Intrinsic::dbg_declare);
>> }
>>
>> +Instruction *DIBuilder::insertDbgValueIntrinsic(
>> + llvm::Value *Val, DILocalVariable *VarInfo, DIExpression *Expr,
>> + const DILocation *DL, BasicBlock *InsertBB, Instruction
>> *InsertBefore) {
>> + if (!ValueFn)
>> + ValueFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_value);
>> + return insertDbgIntrinsic(ValueFn, Val, VarInfo, Expr, DL, InsertBB,
>> + InsertBefore);
>> +}
>> +
>> +Instruction *DIBuilder::insertDbgAddrIntrinsic(
>> + llvm::Value *Val, DILocalVariable *VarInfo, DIExpression *Expr,
>> + const DILocation *DL, BasicBlock *InsertBB, Instruction
>> *InsertBefore) {
>> + if (!AddrFn)
>> + AddrFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_addr);
>> + return insertDbgIntrinsic(AddrFn, Val, VarInfo, Expr, DL, InsertBB,
>> + InsertBefore);
>> +}
>> +
>> Instruction *DIBuilder::insertDeclare(Value *Storage, DILocalVariable
>> *VarInfo,
>> DIExpression *Expr, const
>> DILocation *DL,
>> BasicBlock *InsertBB,
>>
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220124/509392b6/attachment.html>
More information about the llvm-commits
mailing list