[PATCH] MachineFunction is exposed to X86AsmParser.

Yuri Gorshenin ygorshenin at chromium.org
Tue Apr 22 10:10:50 PDT 2014


PTAL

================
Comment at: include/llvm/MC/MCTargetAsmParser.h:102
@@ +101,3 @@
+  /// Current MCTargetOptions.
+  const MCTargetOptions *MCOptions;
+
----------------
Rafael Ávila de Espíndola wrote:
> The class small and would be easy to copy. The existence of the onMCTargetOptionSet also suggests value semantics, don't you want to store just a "MCTargetOptions MCOptions"?
> 
Done.

================
Comment at: include/llvm/MC/MCTargetAsmParser.h:122
@@ +121,3 @@
+
+  virtual void onMCTargetOptionsSet() {}
+
----------------
Rafael Ávila de Espíndola wrote:
> This can be private. Even better, can't you also just remove setMCTargetOptions method completely and add an argument to createMCAsmParser?
> 
Done, but it required changes for all target parsers.

http://reviews.llvm.org/D3106

REPLY HANDLER ACTIONS
  Reply to comment, or !reject, !abandon, !reclaim, !resign, !rethink, !unsubscribe.






More information about the llvm-commits mailing list