[PATCH] D111770: [DebugInfo] When the enum type causes ODR violation, skip ODRUniquing

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 22 11:04:12 PDT 2021


aprantl accepted this revision.
aprantl added a comment.
This revision is now accepted and ready to land.

>From a pragmatic point of view this seems to make sense to me.



================
Comment at: llvm/lib/IR/Verifier.cpp:847
+    if (DIScope *N = cast<T>(MD).getScope())
+      AssertDI(N->getTag() != dwarf::DW_TAG_enumeration_type,
+               "enum type is not a scope; check enum type ODR "
----------------
Can you add a comment here explaining why we single out enum types?


================
Comment at: llvm/test/Linker/debug-info-bad-enum.ll:2
+; RUN: split-file %s %t
+; RUN: llvm-link -S -o - %t/a.ll %t/b.ll 2>&1 | FileCheck %s
+
----------------
Can you add a comment here explaining what behavior is being tested here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111770



More information about the llvm-commits mailing list