[PATCH] D62319: IR: add 'byval(<ty>)' variant to 'byval' function parameters
Jordan Rose via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 17 14:54:55 PDT 2019
jordan_rose added inline comments.
================
Comment at: llvm/lib/IR/Attributes.cpp:552-553
+ if (AI.isTypeAttribute()) {
+ if (getKindAsEnum() == AI.getKindAsEnum())
+ llvm_unreachable("Comparison of types would be unstable");
+ return getKindAsEnum() < AI.getKindAsEnum();
----------------
dblaikie wrote:
> Prefer assertion rather than branch-to-unreachable
>
> assert(getKindAsEnum() != AI.getKindAsEnum() ...
Swift is [hitting this assertion](https://ci.swift.org/job/swift-PR-osx/14173/consoleFull#1140632946ef3c3c00-f496-40b9-85a7-0eb69d0f491b) on its master-next branch right now when two type attributes are wrapping the same type. Is that supposed to be checked earlier or canonicalized away?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62319/new/
https://reviews.llvm.org/D62319
More information about the llvm-commits
mailing list