[PATCH] D54507: [ThinLTO] Handle chains of aliases

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 11 12:01:32 PST 2018


tejohnson marked 4 inline comments as done.
tejohnson added inline comments.


================
Comment at: include/llvm/IR/ModuleSummaryIndex.h:427
 
 inline GlobalValueSummary *GlobalValueSummary::getBaseObject() {
+  auto *S = this;
----------------
davidxl wrote:
> Can  this be refactored as
> 
>  return const_cast<const GlobalValueSummary *>(this)->getBaseObject();
> 
> to avoid code duplication?
Yep. Although needs another const_cast on the return value to remove the const again.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54507/new/

https://reviews.llvm.org/D54507





More information about the llvm-commits mailing list