From 0a951b775e5c58dd78be79ce6d1e9a34f1b40d90 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Wed, 23 Apr 2014 11:16:03 +0000 Subject: Create MCTargetOptions. For now it contains a single flag, SanitizeAddress, which enables AddressSanitizer instrumentation of inline assembly. Patch by Yuri Gorshenin. llvm-svn: 206971 --- llvm/lib/Target/TargetMachine.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/Target/TargetMachine.cpp') diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp index fe3c870..7c40bcd 100644 --- a/llvm/lib/Target/TargetMachine.cpp +++ b/llvm/lib/Target/TargetMachine.cpp @@ -21,6 +21,7 @@ #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCCodeGenInfo.h" #include "llvm/MC/MCContext.h" +#include "llvm/MC/MCTargetOptions.h" #include "llvm/MC/SectionKind.h" #include "llvm/Support/CommandLine.h" #include "llvm/Target/TargetLowering.h" @@ -89,6 +90,8 @@ void TargetMachine::resetTargetOptions(const MachineFunction *MF) const { RESET_OPTION(NoNaNsFPMath, "no-nans-fp-math"); RESET_OPTION(UseSoftFloat, "use-soft-float"); RESET_OPTION(DisableTailCalls, "disable-tail-calls"); + + TO.MCOptions.SanitizeAddress = F->hasFnAttribute(Attribute::SanitizeAddress); } /// getRelocationModel - Returns the code generation relocation model. The -- cgit v1.1