[PATCH] D89108: [NFC] Add the getSize() interface for MachineConstantPoolValue

Qing Shan Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 9 02:27:16 PDT 2020


steven.zhang added inline comments.


================
Comment at: llvm/lib/Target/X86/X86MCInstLower.cpp:1784
-  const Constant *C = ConstantEntry.Val.ConstVal;
-  assert((!C || ConstantEntry.getType() == C->getType()) &&
-         "Expected a constant of the same type!");
----------------
The assertion here won't help too much as ConstantEntry.getType() is essential C->getType(). Remove this assertion to remove the getType() from MachineConstantPoolEntry.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89108



More information about the llvm-commits mailing list