[PATCH] MachineFunction is exposed to X86AsmParser.
Evgeniy Stepanov
eugenis at google.com
Wed Apr 2 07:52:08 PDT 2014
================
Comment at: include/llvm/MC/MCTargetOptions.h:18
@@ +17,3 @@
+ None, // No instrumentation at all.
+ Address // Instrument instructions with memory arguments.
+};
----------------
SanitizeAddress
I still think that bitfields work better here, even though there may be incompatible instrumentation modes.
================
Comment at: include/llvm/MC/MCTargetOptions.h:24
@@ +23,3 @@
+public:
+ /// AsmInstrumentationMode - This flag is sed by the
+ /// asm-instrumentation=mode option is specified on the command
----------------
s/sed/set/
I'd rather explain what this flag does, not how it gets set. Like "enables AddressSanitizer instrumentation at machine level".
================
Comment at: include/llvm/MC/MCTargetOptions.h:31
@@ +30,3 @@
+
+ MCTargetOptions();
+ void InitFromFlags();
----------------
Where is the definition of this constructor?
What happens to MCTargetOptions without the corresponding clang patch. They should default to no instrumentation.
================
Comment at: include/llvm/Target/TargetMachine.h:111
@@ -110,2 +110,3 @@
void resetTargetOptions(const MachineFunction *MF) const;
+ const TargetOptions &getTargetOptions() const { return Options; }
----------------
Why? Options is a public member.
http://llvm-reviews.chandlerc.com/D3106
More information about the llvm-commits
mailing list