[PATCH] MachineFunction is exposed to X86AsmParser.
Yuri Gorshenin
ygorshenin at chromium.org
Tue Apr 22 06:52:52 PDT 2014
Rafael, Eugene, could you please take another look?
================
Comment at: include/llvm/MC/MCTargetOptions.h:15
@@ +14,3 @@
+
+class MCTargetOptions {
+public:
----------------
Rafael Ávila de Espíndola wrote:
> Do you expect this class to grow? Why have a class with only one field?
Yes, we're expecting that this class will grow. For instance, for memory sanitizer there will be additional bit about whether we need to track origins or not. Another reason is that in tools like llvm-mc this class is initialized independently from other TargetOptions's options.
================
Comment at: lib/MC/MCTargetOptions.cpp:21
@@ +20,3 @@
+
+cl::opt<AsmInstrumentationMode> ClAsmInstrumentation(
+ "asm-instrumentation", cl::desc("Instrumentation of inline assembly and "
----------------
Rafael Ávila de Espíndola wrote:
> We normally don't want to have command line options showing up in a binary just because it it links with MC. Can this be added to just llc and llvm-mc? Maybe add the option to CommandFlags.h or create another similar file for MC?
Done, I've created a separate header with flag and function for initialization from command line.
http://reviews.llvm.org/D3106
More information about the llvm-commits
mailing list