[PATCH] D123800: [BPF] handle opaque-pointer for __builtin_preserve_enum_value

Yonghong Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 14 09:31:54 PDT 2022


yonghong-song added inline comments.


================
Comment at: llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp:953
+    else
+      GV = cast<GlobalVariable>(Call->getArgOperand(1));
     assert(GV->hasInitializer());
----------------
nikic wrote:
> Is it possible to make this `Call->getArgOperand(1)->stripPointerCasts()` instead of a manual check for ConstantExpr?
Thanks for the suggestion. It indeed simplified the code a lot!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123800



More information about the llvm-commits mailing list