gemini-code-assist[bot] commented on code in PR #18706:
URL: https://github.com/apache/tvm/pull/18706#discussion_r2754944997


##########
src/target/llvm/codegen_llvm.cc:
##########
@@ -2323,6 +2323,32 @@ void CodeGenLLVM::AddDebugInformation(llvm::Value* 
llvm_value, const Var& tir_va
 
   auto* di_loc = llvm::DILocation::get(*llvm_target_->GetContext(), 0, 0, 
di_subprogram_);
 
+#if TVM_LLVM_VERSION >= 150
+  // LLVM 15+ requires dbg_declare to reference pointer or integer types only.

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   The comment is slightly inaccurate. According to the LLVM 15 source code for 
`DIBuilder::insertDeclare`, it asserts that the storage must be a pointer type. 
The mention of "integer types" seems incorrect. It should be just "pointer 
types".
   
   ```c
     // LLVM 15+ requires dbg_declare to reference pointer types only.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to