From d6af41b2eb87a1f822932aa19b4a9f6039de11fd 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206971 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-mc/llvm-mc.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tools/llvm-mc') diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp index 61fd2c486c..a8a3d994b5 100644 --- a/tools/llvm-mc/llvm-mc.cpp +++ b/tools/llvm-mc/llvm-mc.cpp @@ -25,6 +25,7 @@ #include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCSubtargetInfo.h" #include "llvm/MC/MCTargetAsmParser.h" +#include "llvm/MC/MCTargetOptionsCommandFlags.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Compression.h" #include "llvm/Support/FileUtilities.h" @@ -320,9 +321,11 @@ static int AsLexInput(SourceMgr &SrcMgr, MCAsmInfo &MAI, tool_output_file *Out) static int AssembleInput(const char *ProgName, const Target *TheTarget, SourceMgr &SrcMgr, MCContext &Ctx, MCStreamer &Str, MCAsmInfo &MAI, MCSubtargetInfo &STI, MCInstrInfo &MCII) { - std::unique_ptr Parser(createMCAsmParser(SrcMgr, Ctx, Str, MAI)); + std::unique_ptr Parser( + createMCAsmParser(SrcMgr, Ctx, Str, MAI)); std::unique_ptr TAP( - TheTarget->createMCAsmParser(STI, *Parser, MCII)); + TheTarget->createMCAsmParser(STI, *Parser, MCII, + InitMCTargetOptionsFromFlags())); if (!TAP) { errs() << ProgName << ": error: this target does not support assembly parsing.\n"; -- cgit v1.2.3