summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetMachine.cpp
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2014-04-23 11:16:03 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2014-04-23 11:16:03 +0000
commit0a951b775e5c58dd78be79ce6d1e9a34f1b40d90 (patch)
tree343209715b672a6ad6f8fd9cf9f97eb3a28a7327 /llvm/lib/Target/TargetMachine.cpp
parenteeb820f572960f61dd1f98879a2a1f7137990d40 (diff)
downloadbcm5719-llvm-0a951b775e5c58dd78be79ce6d1e9a34f1b40d90.tar.gz
bcm5719-llvm-0a951b775e5c58dd78be79ce6d1e9a34f1b40d90.zip
Create MCTargetOptions.
For now it contains a single flag, SanitizeAddress, which enables AddressSanitizer instrumentation of inline assembly. Patch by Yuri Gorshenin. llvm-svn: 206971
Diffstat (limited to 'llvm/lib/Target/TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/TargetMachine.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp
index fe3c870c980..7c40bcd559b 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
OpenPOWER on IntegriCloud