[PATCH] MC: Allow targets to stop symbol name quoting

Matt Arsenault Matthew.Arsenault at amd.com
Thu Apr 30 16:23:27 PDT 2015


================
Comment at: lib/MC/MCSymbol.cpp:29
@@ -48,3 +28,3 @@
 
-void MCSymbol::print(raw_ostream &OS) const {
+void MCSymbol::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
   // The name for this MCSymbol is required to be a valid target name.  However,
----------------
rafael wrote:
> Can you pass a "const MCAsmInfo &" ?
> 
> For the debug uses (i.e., dump), they can just say
> 
> OS << Symbol->getName()
> 
> instead of
> 
> Symbol->print(OS, nullptr);
> 
I don't think so. For MCSymbol specifically, that would work. Most of these changes are for printing the MCExpr / MCOperands, which don't have a simple getName way of printing them, so those are handled with a null check in the MCSymbol printing

http://reviews.llvm.org/D9207

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list