[PATCH] [asan-asm-instrumentation] CFI directives are generated for .S files.

Evgeniy Stepanov eugenis at google.com
Wed Oct 1 05:26:57 PDT 2014


LGTM, but I'd like someone else to vet the changes to MCStreamer / MCDwarf.

================
Comment at: lib/MC/MCStreamer.cpp:223
@@ -222,1 +222,3 @@
 
+  const MCAsmInfo* MAI = Context.getAsmInfo();
+  if (MAI) {
----------------
I don't really like that we do this extra work (a) for each function and (b) even when there is no instrumentation and CurrentCfaRegister is unused. But all alternatives seem much more complex, and this loop typically has just one or two iterations, so maybe it's not worth optimizing.

http://reviews.llvm.org/D5520






More information about the llvm-commits mailing list