================
@@ -2980,6 +2980,27 @@ bool AsmPrinter::doFinalization(Module &M) {
 
   TLOF.emitModuleMetadata(*OutStreamer, M);
 
+  // Emit raw section data from llvm.raw.sections metadata.
+  if (const NamedMDNode *RawSections =
+          M.getNamedMetadata("llvm.raw.sections")) {
+    for (const MDNode *Op : RawSections->operands()) {
+      assert(Op->getNumOperands() == 3 &&
+             "llvm.raw.sections metadata entry must have three operands");
----------------
antoniofrighetto wrote:

I think this should use report_fatal_error() (and the metadata validation 
checks, including this one, should possibly be in Verifier).

https://github.com/llvm/llvm-project/pull/214135
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to