[PATCH] MachineFunction is exposed to X86AsmParser.

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Tue Apr 22 07:03:46 PDT 2014



================
Comment at: include/llvm/MC/MCTargetAsmParser.h:102
@@ +101,3 @@
+  /// Current MCTargetOptions.
+  const MCTargetOptions *MCOptions;
+
----------------
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"?


================
Comment at: include/llvm/MC/MCTargetAsmParser.h:122
@@ +121,3 @@
+
+  virtual void onMCTargetOptionsSet() {}
+
----------------
This can be private. Even better, can't you also just remove setMCTargetOptions method completely and add an argument to createMCAsmParser?



http://reviews.llvm.org/D3106






More information about the llvm-commits mailing list