llvm.org GIT mirror llvm / d6af41b
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 Evgeniy Stepanov 6 years ago
26 changed file(s) with 211 addition(s) and 68 deletion(s). Raw diff Collapse all Expand all
1515 #ifndef LLVM_CODEGEN_COMMANDFLAGS_H
1616 #define LLVM_CODEGEN_COMMANDFLAGS_H
1717
18 #include "llvm/MC/MCTargetOptionsCommandFlags.h"
1819 #include "llvm/Support/CodeGen.h"
1920 #include "llvm/Support/CommandLine.h"
2021 #include "llvm/Target/TargetMachine.h"
224225 Options.TrapFuncName = TrapFuncName;
225226 Options.PositionIndependentExecutable = EnablePIE;
226227 Options.UseInitArray = UseInitArray;
228
229 Options.MCOptions = InitMCTargetOptionsFromFlags();
230
227231 return Options;
228232 }
229233
1111
1212 #include "llvm/MC/MCExpr.h"
1313 #include "llvm/MC/MCParser/MCAsmParserExtension.h"
14 #include "llvm/MC/MCTargetOptions.h"
1415
1516 namespace llvm {
17 class AsmToken;
18 class MCInst;
19 class MCParsedAsmOperand;
1620 class MCStreamer;
21 class SMLoc;
1722 class StringRef;
18 class SMLoc;
19 class AsmToken;
20 class MCParsedAsmOperand;
21 class MCInst;
2223 template class SmallVectorImpl;
2324
2425 enum AsmRewriteKind {
9596 /// SemaCallback - The Sema callback implementation. Must be set when parsing
9697 /// ms-style inline assembly.
9798 MCAsmParserSemaCallback *SemaCallback;
99
100 /// Set of options which affects instrumentation of inline assembly.
101 MCTargetOptions MCOptions;
98102
99103 public:
100104 virtual ~MCTargetAsmParser();
0 //===- MCTargetOptions.h - MC Target Options -------------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_MC_MCTARGETOPTIONS_H
10 #define LLVM_MC_MCTARGETOPTIONS_H
11
12 namespace llvm {
13
14 class MCTargetOptions {
15 public:
16 enum AsmInstrumentation {
17 AsmInstrumentationNone,
18 AsmInstrumentationAddress
19 };
20
21 /// Enables AddressSanitizer instrumentation at machine level.
22 bool SanitizeAddress : 1;
23
24 MCTargetOptions();
25 };
26
27 inline bool operator==(const MCTargetOptions &LHS, const MCTargetOptions &RHS) {
28 #define ARE_EQUAL(X) LHS.X == RHS.X
29 return ARE_EQUAL(SanitizeAddress);
30 #undef ARE_EQUAL
31 }
32
33 inline bool operator!=(const MCTargetOptions &LHS, const MCTargetOptions &RHS) {
34 return !(LHS == RHS);
35 }
36
37 } // end namespace llvm
38
39 #endif
0 //===-- MCTargetOptionsCommandFlags.h --------------------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains machine code-specific flags that are shared between
10 // different command line tools.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_MC_MCTARGETOPTIONSCOMMANDFLAGS_H
15 #define LLVM_MC_MCTARGETOPTIONSCOMMANDFLAGS_H
16
17 #include "llvm/Support/CommandLine.h"
18 #include "llvm/MC/MCTargetOptions.h"
19 using namespace llvm;
20
21 cl::opt AsmInstrumentation(
22 "asm-instrumentation",
23 cl::desc("Instrumentation of inline assembly and "
24 "assembly source files"),
25 cl::init(MCTargetOptions::AsmInstrumentationNone),
26 cl::values(clEnumValN(MCTargetOptions::AsmInstrumentationNone,
27 "none",
28 "no instrumentation at all"),
29 clEnumValN(MCTargetOptions::AsmInstrumentationAddress,
30 "address",
31 "instrument instructions with memory arguments"),
32 clEnumValEnd));
33
34 static inline MCTargetOptions InitMCTargetOptionsFromFlags() {
35 MCTargetOptions Options;
36 Options.SanitizeAddress =
37 (AsmInstrumentation == MCTargetOptions::AsmInstrumentationAddress);
38 return Options;
39 }
40
41 #endif
4444 class MCSymbolizer;
4545 class MCRelocationInfo;
4646 class MCTargetAsmParser;
47 class MCTargetOptions;
4748 class TargetMachine;
4849 class TargetOptions;
4950 class raw_ostream;
103104 const MCRegisterInfo &MRI,
104105 StringRef TT,
105106 StringRef CPU);
106 typedef MCTargetAsmParser *(*MCAsmParserCtorTy)(MCSubtargetInfo &STI,
107 MCAsmParser &P,
108 const MCInstrInfo &MII);
107 typedef MCTargetAsmParser *(*MCAsmParserCtorTy)(
108 MCSubtargetInfo &STI,
109 MCAsmParser &P,
110 const MCInstrInfo &MII,
111 const MCTargetOptions &Options);
109112 typedef MCDisassembler *(*MCDisassemblerCtorTy)(const Target &T,
110113 const MCSubtargetInfo &STI,
111114 MCContext &Ctx);
361364 ///
362365 /// \param Parser The target independent parser implementation to use for
363366 /// parsing and lexing.
364 MCTargetAsmParser *createMCAsmParser(MCSubtargetInfo &STI,
365 MCAsmParser &Parser,
366 const MCInstrInfo &MII) const {
367 MCTargetAsmParser *createMCAsmParser(
368 MCSubtargetInfo &STI,
369 MCAsmParser &Parser,
370 const MCInstrInfo &MII,
371 const MCTargetOptions &Options) const {
367372 if (!MCAsmParserCtorFn)
368373 return nullptr;
369 return MCAsmParserCtorFn(STI, Parser, MII);
374 return MCAsmParserCtorFn(STI, Parser, MII, Options);
370375 }
371376
372377 /// createAsmPrinter - Create a target specific assembly printer pass. This
10981103
10991104 private:
11001105 static MCTargetAsmParser *Allocator(MCSubtargetInfo &STI, MCAsmParser &P,
1101 const MCInstrInfo &MII) {
1102 return new MCAsmParserImpl(STI, P, MII);
1106 const MCInstrInfo &MII,
1107 const MCTargetOptions &Options) {
1108 return new MCAsmParserImpl(STI, P, MII, Options);
11031109 }
11041110 };
11051111
1414 #ifndef LLVM_TARGET_TARGETOPTIONS_H
1515 #define LLVM_TARGET_TARGETOPTIONS_H
1616
17 #include "llvm/MC/MCTargetOptions.h"
1718 #include
1819
1920 namespace llvm {
196197 /// via the llvm.fma.* intrinsic) will always be honored, regardless of
197198 /// the value of this option.
198199 FPOpFusion::FPOpFusionMode AllowFPOpFusion;
200
201 /// Machine level options.
202 MCTargetOptions MCOptions;
199203 };
200204
201205 // Comparison operators:
222226 ARE_EQUAL(TrapUnreachable) &&
223227 ARE_EQUAL(TrapFuncName) &&
224228 ARE_EQUAL(FloatABIType) &&
225 ARE_EQUAL(AllowFPOpFusion);
229 ARE_EQUAL(AllowFPOpFusion) &&
230 ARE_EQUAL(MCOptions);
226231 #undef ARE_EQUAL
227232 }
228233
1414 #include "llvm/ADT/SmallString.h"
1515 #include "llvm/ADT/Twine.h"
1616 #include "llvm/CodeGen/MachineBasicBlock.h"
17 #include "llvm/CodeGen/MachineFunction.h"
1718 #include "llvm/CodeGen/MachineModuleInfo.h"
1819 #include "llvm/IR/Constants.h"
1920 #include "llvm/IR/DataLayout.h"
134135 // emitInlineAsmEnd().
135136 MCSubtargetInfo STIOrig = *STI;
136137
138 MCTargetOptions MCOptions;
139 if (MF)
140 MCOptions = MF->getTarget().Options.MCOptions;
137141 std::unique_ptr TAP(
138 TM.getTarget().createMCAsmParser(*STI, *Parser, *MII));
142 TM.getTarget().createMCAsmParser(*STI, *Parser, *MII, MCOptions));
139143 if (!TAP)
140144 report_fatal_error("Inline asm not supported by this streamer because"
141145 " we don't have an asm parser for this target\n");
738738 _target->getTargetTriple(), _target->getTargetCPU(),
739739 _target->getTargetFeatureString()));
740740 std::unique_ptr TAP(
741 T.createMCAsmParser(*STI, *Parser.get(), *MCII));
741 T.createMCAsmParser(*STI, *Parser.get(), *MCII,
742 _target->Options.MCOptions));
742743 if (!TAP) {
743744 errMsg = "target " + std::string(T.getName()) +
744745 " does not define AsmParser.";
4444 MCSubtargetInfo.cpp
4545 MCSymbol.cpp
4646 MCSymbolizer.cpp
47 MCTargetOptions.cpp
4748 MCValue.cpp
4849 MCWin64EH.cpp
4950 MachObjectWriter.cpp
0 //===- lib/MC/MCTargetOptions.cpp - MC Target Options --------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include "llvm/MC/MCTargetOptions.h"
10
11 namespace llvm {
12
13 MCTargetOptions::MCTargetOptions() : SanitizeAddress(false) {}
14
15 } // end namespace llvm
5454 };
5555
5656 AArch64AsmParser(MCSubtargetInfo &_STI, MCAsmParser &_Parser,
57 const MCInstrInfo &MII)
57 const MCInstrInfo &MII,
58 const MCTargetOptions &Options)
5859 : MCTargetAsmParser(), STI(_STI), Parser(_Parser) {
5960 MCAsmParserExtension::Initialize(_Parser);
6061
343343 };
344344
345345 ARMAsmParser(MCSubtargetInfo &_STI, MCAsmParser &_Parser,
346 const MCInstrInfo &MII)
346 const MCInstrInfo &MII,
347 const MCTargetOptions &Options)
347348 : MCTargetAsmParser(), STI(_STI), Parser(_Parser), MII(MII), UC(_Parser) {
348349 MCAsmParserExtension::Initialize(_Parser);
349350
103103 #include "ARM64GenAsmMatcher.inc"
104104 };
105105 ARM64AsmParser(MCSubtargetInfo &_STI, MCAsmParser &_Parser,
106 const MCInstrInfo &MII)
106 const MCInstrInfo &MII,
107 const MCTargetOptions &Options)
107108 : MCTargetAsmParser(), STI(_STI), Parser(_Parser) {
108109 MCAsmParserExtension::Initialize(_Parser);
109110
228228
229229 public:
230230 MipsAsmParser(MCSubtargetInfo &sti, MCAsmParser &parser,
231 const MCInstrInfo &MII)
231 const MCInstrInfo &MII,
232 const MCTargetOptions &Options)
232233 : MCTargetAsmParser(), STI(sti), Parser(parser) {
233234 // Initialize the set of available features.
234235 setAvailableFeatures(ComputeAvailableFeatures(STI.getFeatureBits()));
263263
264264 public:
265265 PPCAsmParser(MCSubtargetInfo &_STI, MCAsmParser &_Parser,
266 const MCInstrInfo &_MII)
266 const MCInstrInfo &_MII,
267 const MCTargetOptions &Options)
267268 : MCTargetAsmParser(), STI(_STI), Parser(_Parser), MII(_MII) {
268269 // Check for 64-bit vs. 32-bit pointer mode.
269270 Triple TheTriple(STI.getTargetTriple());
8282 bool is64Bit() const { return STI.getTargetTriple().startswith("sparcv9"); }
8383 public:
8484 SparcAsmParser(MCSubtargetInfo &sti, MCAsmParser &parser,
85 const MCInstrInfo &MII)
85 const MCInstrInfo &MII,
86 const MCTargetOptions &Options)
8687 : MCTargetAsmParser(), STI(sti), Parser(parser) {
8788 // Initialize the set of available features.
8889 setAvailableFeatures(ComputeAvailableFeatures(STI.getFeatureBits()));
330330
331331 public:
332332 SystemZAsmParser(MCSubtargetInfo &sti, MCAsmParser &parser,
333 const MCInstrInfo &MII)
333 const MCInstrInfo &MII,
334 const MCTargetOptions &Options)
334335 : MCTargetAsmParser(), STI(sti), Parser(parser) {
335336 MCAsmParserExtension::Initialize(Parser);
336337
2020 #include "llvm/MC/MCAsmInfo.h"
2121 #include "llvm/MC/MCCodeGenInfo.h"
2222 #include "llvm/MC/MCContext.h"
23 #include "llvm/MC/MCTargetOptions.h"
2324 #include "llvm/MC/SectionKind.h"
2425 #include "llvm/Support/CommandLine.h"
2526 #include "llvm/Target/TargetLowering.h"
8889 RESET_OPTION(NoNaNsFPMath, "no-nans-fp-math");
8990 RESET_OPTION(UseSoftFloat, "use-soft-float");
9091 RESET_OPTION(DisableTailCalls, "disable-tail-calls");
92
93 TO.MCOptions.SanitizeAddress = F->hasFnAttribute(Attribute::SanitizeAddress);
9194 }
9295
9396 /// getRelocationModel - Returns the code generation relocation model. The
1010 #include "X86AsmInstrumentation.h"
1111 #include "X86Operand.h"
1212 #include "llvm/ADT/StringExtras.h"
13 #include "llvm/IR/Function.h"
1314 #include "llvm/MC/MCContext.h"
1415 #include "llvm/MC/MCInst.h"
1516 #include "llvm/MC/MCInstBuilder.h"
17 #include "llvm/MC/MCParser/MCParsedAsmOperand.h"
1618 #include "llvm/MC/MCStreamer.h"
1719 #include "llvm/MC/MCSubtargetInfo.h"
18 #include "llvm/Support/CommandLine.h"
19 #include "llvm/Support/Compiler.h"
20 #include "llvm/MC/MCParser/MCParsedAsmOperand.h"
20 #include "llvm/MC/MCTargetOptions.h"
2121
2222 namespace llvm {
2323 namespace {
24
25 static cl::opt ClAsanInstrumentInlineAssembly(
26 "asan-instrument-inline-assembly", cl::desc("instrument inline assembly"),
27 cl::Hidden, cl::init(false));
2824
2925 bool IsStackReg(unsigned Reg) {
3026 return Reg == X86::RSP || Reg == X86::ESP || Reg == X86::SP;
3733
3834 class X86AddressSanitizer : public X86AsmInstrumentation {
3935 public:
40 X86AddressSanitizer(MCSubtargetInfo &sti) : STI(sti) {}
36 X86AddressSanitizer(const MCSubtargetInfo &STI) : STI(STI) {}
4137 virtual ~X86AddressSanitizer() {}
4238
4339 // X86AsmInstrumentation implementation:
6258 }
6359
6460 protected:
65 MCSubtargetInfo &STI;
61 const MCSubtargetInfo &STI;
6662 };
6763
6864 void X86AddressSanitizer::InstrumentMemOperand(
143139
144140 class X86AddressSanitizer32 : public X86AddressSanitizer {
145141 public:
146 X86AddressSanitizer32(MCSubtargetInfo &sti) : X86AddressSanitizer(sti) {}
142 X86AddressSanitizer32(const MCSubtargetInfo &STI)
143 : X86AddressSanitizer(STI) {}
147144 virtual ~X86AddressSanitizer32() {}
148145
149146 virtual void InstrumentMemOperandImpl(X86Operand *Op, unsigned AccessSize,
178175
179176 class X86AddressSanitizer64 : public X86AddressSanitizer {
180177 public:
181 X86AddressSanitizer64(MCSubtargetInfo &sti) : X86AddressSanitizer(sti) {}
178 X86AddressSanitizer64(const MCSubtargetInfo &STI)
179 : X86AddressSanitizer(STI) {}
182180 virtual ~X86AddressSanitizer64() {}
183181
184182 virtual void InstrumentMemOperandImpl(X86Operand *Op, unsigned AccessSize,
222220 const MCInst &Inst, SmallVectorImpl &Operands,
223221 MCContext &Ctx, MCStreamer &Out) {}
224222
225 X86AsmInstrumentation *CreateX86AsmInstrumentation(MCSubtargetInfo &STI) {
226 if (ClAsanInstrumentInlineAssembly) {
223 X86AsmInstrumentation *
224 CreateX86AsmInstrumentation(const MCTargetOptions &MCOptions, const MCContext &Ctx,
225 const MCSubtargetInfo &STI) {
226 if (MCOptions.SanitizeAddress) {
227227 if ((STI.getFeatureBits() & X86::Mode32Bit) != 0)
228228 return new X86AddressSanitizer32(STI);
229229 if ((STI.getFeatureBits() & X86::Mode64Bit) != 0)
1818 class MCParsedAsmOperand;
1919 class MCStreamer;
2020 class MCSubtargetInfo;
21 class MCTargetOptions;
2122
2223 class X86AsmInstrumentation;
2324
24 X86AsmInstrumentation *CreateX86AsmInstrumentation(MCSubtargetInfo &STI);
25 X86AsmInstrumentation *
26 CreateX86AsmInstrumentation(const MCTargetOptions &MCOptions,
27 const MCContext &Ctx, const MCSubtargetInfo &STI);
2528
2629 class X86AsmInstrumentation {
2730 public:
3538
3639 protected:
3740 friend X86AsmInstrumentation *
38 CreateX86AsmInstrumentation(MCSubtargetInfo &STI);
41 CreateX86AsmInstrumentation(const MCTargetOptions &MCOptions,
42 const MCContext &Ctx, const MCSubtargetInfo &STI);
3943
4044 X86AsmInstrumentation();
4145 };
4246
43 } // End llvm namespace
47 } // End llvm namespace
4448
45 #endif // X86_ASM_INSTRUMENTATION_H
49 #endif // X86_ASM_INSTRUMENTATION_H
709709
710710 public:
711711 X86AsmParser(MCSubtargetInfo &sti, MCAsmParser &parser,
712 const MCInstrInfo &MII)
712 const MCInstrInfo &MII,
713 const MCTargetOptions &Options)
713714 : MCTargetAsmParser(), STI(sti), Parser(parser), InstInfo(0) {
714715
715716 // Initialize the set of available features.
716717 setAvailableFeatures(ComputeAvailableFeatures(STI.getFeatureBits()));
717 Instrumentation.reset(CreateX86AsmInstrumentation(STI));
718 }
718 Instrumentation.reset(
719 CreateX86AsmInstrumentation(Options, Parser.getContext(), STI));
720 }
721
719722 bool ParseRegister(unsigned &RegNo, SMLoc &StartLoc, SMLoc &EndLoc) override;
720723
721724 bool
0 ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 -mattr=+sse2 -asm-instrumentation=address | FileCheck %s
1
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
3 target triple = "x86_64-unknown-linux-gnu"
4
5 ; CHECK-LABEL: mov_no_attr
6 ; CHECK-NOT: callq __sanitizer_sanitize_load8@PLT
7 ; CHECK-NOT: callq __sanitizer_sanitize_store8@PLT
8 define void @mov_no_attr(i64* %dst, i64* %src) {
9 tail call void asm sideeffect "movq ($1), %rax \0A\09movq %rax, ($0) \0A\09", "r,r,~{memory},~{rax},~{dirflag},~{fpsr},~{flags}"(i64* %dst, i64* %src)
10 ret void
11 }
12
13 ; CHECK-LABEL: mov_sanitize
14 ; CHECK: callq __sanitizer_sanitize_load8@PLT
15 ; CHECK: callq __sanitizer_sanitize_store8@PLT
16 define void @mov_sanitize(i64* %dst, i64* %src) sanitize_address {
17 tail call void asm sideeffect "movq ($1), %rax \0A\09movq %rax, ($0) \0A\09", "r,r,~{memory},~{rax},~{dirflag},~{fpsr},~{flags}"(i64* %dst, i64* %src)
18 ret void
19 }
None ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 -mattr=+sse2 -asan-instrument-inline-assembly | FileCheck %s
0 ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 -mattr=+sse2 -asm-instrumentation=address | FileCheck %s
11
22 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
33 target triple = "x86_64-unknown-linux-gnu"
112112 ret void
113113 }
114114
115 attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
115 attributes #0 = { nounwind uwtable sanitize_address "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
116116 attributes #1 = { nounwind }
117117
118118 !0 = metadata !{i32 98, i32 122, i32 160}
None # RUN: llvm-mc %s -triple=x86_64-unknown-linux-gnu -mcpu=corei7 -mattr=+sse2 -asan-instrument-inline-assembly | FileCheck %s
0 # RUN: llvm-mc %s -triple=x86_64-unknown-linux-gnu -mcpu=corei7 -mattr=+sse2 -asm-instrumentation=address | FileCheck %s
11
22 .text
33 .globl mov1b
1919 .size mov1b, .Ltmp0-mov1b
2020 .cfi_endproc
2121
22 .globl mov16b
23 .align 16, 0x90
24 .type mov16b,@function
25 # CHECK-LABEL: mov16b
26 # CHECK-NOT: callq __sanitizer_sanitize_load16@PLT
27 # CHECK-NOT: callq __sanitizer_sanitize_store16@PLT
28 mov16b: # @mov16b
29 .cfi_startproc
30 # BB#0:
31 #APP
32 movaps (%rsi), %xmm0
33 movaps %xmm0, (%rdi)
34
35 #NO_APP
36 retq
37 .Ltmp1:
38 .size mov16b, .Ltmp1-mov16b
39 .cfi_endproc
40
41
4222 .ident "clang version 3.5 "
4323 .section ".note.GNU-stack","",@progbits
2424 #include "llvm/MC/MCStreamer.h"
2525 #include "llvm/MC/MCSubtargetInfo.h"
2626 #include "llvm/MC/MCTargetAsmParser.h"
27 #include "llvm/MC/MCTargetOptionsCommandFlags.h"
2728 #include "llvm/Support/CommandLine.h"
2829 #include "llvm/Support/Compression.h"
2930 #include "llvm/Support/FileUtilities.h"
319320 static int AssembleInput(const char *ProgName, const Target *TheTarget,
320321 SourceMgr &SrcMgr, MCContext &Ctx, MCStreamer &Str,
321322 MCAsmInfo &MAI, MCSubtargetInfo &STI, MCInstrInfo &MCII) {
322 std::unique_ptr Parser(createMCAsmParser(SrcMgr, Ctx, Str, MAI));
323 std::unique_ptr Parser(
324 createMCAsmParser(SrcMgr, Ctx, Str, MAI));
323325 std::unique_ptr TAP(
324 TheTarget->createMCAsmParser(STI, *Parser, MCII));
326 TheTarget->createMCAsmParser(STI, *Parser, MCII,
327 InitMCTargetOptionsFromFlags()));
325328 if (!TAP) {
326329 errs() << ProgName
327330 << ": error: this target does not support assembly parsing.\n";