[PATCH] [asan-assembly-instrumentation] Added CFI directives to the generated instrumentation code.
Yuri Gorshenin
ygorshenin at chromium.org
Tue Sep 9 03:09:38 PDT 2014
PTAL
End-to-end test is added in http://reviews.llvm.org/D5260.
================
Comment at: include/llvm/MC/MCTargetAsmParser.h:126
@@ -125,1 +125,3 @@
+ virtual void SetFrameRegister(unsigned RegNo) {}
+
----------------
eugenis wrote:
> Please add a comment.
> How does it behave when parsing top-level asm?
>
Done.
================
Comment at: lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp:557
@@ -529,1 +556,3 @@
+ : X86AddressSanitizer(STI),
+ RegisterInfo(TheX86_64Target.createMCRegInfo(STI.getTargetTriple())) {}
virtual ~X86AddressSanitizer64() {}
----------------
eugenis wrote:
> Is it the right way to obtain MCRegisterInfo?
> Direct calls to TheXXXTarget seem to be rather uncommon.
>
It seems that it's possible to get MCRegisterInfo from MCContext, thanks!
http://reviews.llvm.org/D5189
More information about the llvm-commits
mailing list