You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "junrushao (via GitHub)" <gi...@apache.org> on 2023/10/16 18:52:32 UTC
Re: [PR] [Target] LLVM helper functions for any target info [tvm]
junrushao commented on PR #15761:
URL: https://github.com/apache/tvm/pull/15761#issuecomment-1765093175
Hey @cbalint13, I got a compiler warning from this commit saying:
```
/Users/jshao/Projects/tvm-dev/src/target/llvm/llvm_instance.cc:76:81: warning: reference to stack memory associated with parameter 'Obj' returned [-Wreturn-stack-address]
76 | friend ArrayRef<SubtargetSubTypeKV>& archViewer(MCSubtargetInfo Obj) { return Obj.*Member; }
| ^~~
/Users/jshao/Projects/tvm-dev/src/target/llvm/llvm_instance.cc:84:81: warning: reference to stack memory associated with parameter 'Obj' returned [-Wreturn-stack-address]
84 | friend ArrayRef<SubtargetFeatureKV>& featViewer(MCSubtargetInfo Obj) { return Obj.*Member; }
| ^~~
/Users/jshao/Projects/tvm-dev/src/target/llvm/llvm_instance.cc:763:49: warning: cast from 'const llvm::MCSubtargetInfo *' to 'llvm::MCSubtargetInfo *' drops const qualifier [-Wcast-qual]
763 | llvm::archViewer(*(llvm::MCSubtargetInfo*)MCInfo);
| ^
/Users/jshao/Projects/tvm-dev/src/target/llvm/llvm_instance.cc:784:49: warning: cast from 'const llvm::MCSubtargetInfo *' to 'llvm::MCSubtargetInfo *' drops const qualifier [-Wcast-qual]
784 | llvm::featViewer(*(llvm::MCSubtargetInfo*)MCInfo);
| ^
```
I am a bit confused by the warning message, not completely sure if it is false positive from the compiler, so am following up here to double check
--
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: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org