[PATCH] Remove const_cast for STI when parsing inline asm

Jim Grosbach grosbach at apple.com
Wed Feb 5 15:50:34 PST 2014


  Seems reasonable. Minor comment inline.


================
Comment at: lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp:122
@@ +121,3 @@
+  // the existing STI in the TM because any sharing of the STI with backend
+  // code emitters is now explicit.
+  OwningPtr<MCSubtargetInfo> STI(TM.getTarget().createMCSubtargetInfo(
----------------
Temporal references won't make much sense a few months from now. Better to instead directly reference how/why/where/whatever the sharing is explicit and why it's better to create a new one rather than using the existing one.


http://llvm-reviews.chandlerc.com/D2709



More information about the llvm-commits mailing list