[PATCH] Emit Clang version information into .comment section (CodeGen's part of implementation) [PART 2A]
Rafael Ávila de Espíndola
rafael.espindola at gmail.com
Wed Oct 2 10:55:15 PDT 2013
You are also missing a test that the verifier rejects broken IL files.
What is the URL for the MC part?
================
Comment at: lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1347
@@ +1346,3 @@
+ "llvm.ident metadata entry can have only one operand");
+ if (const MDString *S = dyn_cast<MDString>(N->getOperand(0)))
+ OutStreamer.EmitIdent(S->getString());
----------------
please use cast instead of dyn_cast and have the verifier check that we only get strings in here.
================
Comment at: lib/IR/Verifier.cpp:628
@@ +627,3 @@
+ Assert1(N->getNumOperands() == 1,
+ "incorrect number of operands in llvm.ident metadata", N);
+ }
----------------
Please check that it is a string too.
http://llvm-reviews.chandlerc.com/D1806
More information about the llvm-commits
mailing list