Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where they belong.
authorEvan Cheng <evan.cheng@apple.com>
Sat, 23 Jul 2011 00:45:41 +0000 (00:45 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Sat, 23 Jul 2011 00:45:41 +0000 (00:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135833 91177308-0d34-0410-b5e6-96231b3b80d8

40 files changed:
include/llvm/MC/TargetAsmBackend.h [new file with mode: 0644]
include/llvm/MC/TargetAsmLexer.h [new file with mode: 0644]
include/llvm/MC/TargetAsmParser.h [new file with mode: 0644]
include/llvm/Target/TargetAsmBackend.h [deleted file]
include/llvm/Target/TargetAsmLexer.h [deleted file]
include/llvm/Target/TargetAsmParser.h [deleted file]
lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
lib/MC/CMakeLists.txt
lib/MC/ELFObjectWriter.cpp
lib/MC/MCAsmStreamer.cpp
lib/MC/MCAssembler.cpp
lib/MC/MCDisassembler/EDDisassembler.cpp
lib/MC/MCELF.cpp
lib/MC/MCELFStreamer.cpp
lib/MC/MCExpr.cpp
lib/MC/MCMachOStreamer.cpp
lib/MC/MCObjectStreamer.cpp
lib/MC/MCParser/AsmParser.cpp
lib/MC/MCParser/COFFAsmParser.cpp
lib/MC/MCParser/MCAsmParser.cpp
lib/MC/MCParser/TargetAsmParser.cpp
lib/MC/MachObjectWriter.cpp
lib/MC/TargetAsmBackend.cpp
lib/MC/TargetAsmLexer.cpp [new file with mode: 0644]
lib/MC/WinCOFFStreamer.cpp
lib/Target/ARM/AsmParser/ARMAsmLexer.cpp
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp
lib/Target/CMakeLists.txt
lib/Target/MBlaze/AsmParser/MBlazeAsmLexer.cpp
lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp
lib/Target/MBlaze/MBlazeAsmBackend.cpp
lib/Target/PowerPC/PPCAsmBackend.cpp
lib/Target/TargetAsmLexer.cpp [deleted file]
lib/Target/X86/AsmParser/X86AsmLexer.cpp
lib/Target/X86/AsmParser/X86AsmParser.cpp
lib/Target/X86/X86AsmBackend.cpp
tools/llvm-mc/llvm-mc.cpp
tools/lto/LTOModule.cpp

diff --git a/include/llvm/MC/TargetAsmBackend.h b/include/llvm/MC/TargetAsmBackend.h
new file mode 100644 (file)
index 0000000..f64cac1
--- /dev/null
@@ -0,0 +1,131 @@
+//===-- llvm/MC/TargetAsmBackend.h - Target Asm Backend ---------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_TARGET_TARGETASMBACKEND_H
+#define LLVM_TARGET_TARGETASMBACKEND_H
+
+#include "llvm/MC/MCDirectives.h"
+#include "llvm/MC/MCFixup.h"
+#include "llvm/MC/MCFixupKindInfo.h"
+#include "llvm/Support/DataTypes.h"
+
+namespace llvm {
+class MCELFObjectTargetWriter;
+class MCFixup;
+class MCInst;
+class MCObjectWriter;
+class MCSection;
+template<typename T>
+class SmallVectorImpl;
+class raw_ostream;
+
+/// TargetAsmBackend - Generic interface to target specific assembler backends.
+class TargetAsmBackend {
+  TargetAsmBackend(const TargetAsmBackend &);   // DO NOT IMPLEMENT
+  void operator=(const TargetAsmBackend &);  // DO NOT IMPLEMENT
+protected: // Can only create subclasses.
+  TargetAsmBackend();
+
+  unsigned HasReliableSymbolDifference : 1;
+
+public:
+  virtual ~TargetAsmBackend();
+
+  /// createObjectWriter - Create a new MCObjectWriter instance for use by the
+  /// assembler backend to emit the final object file.
+  virtual MCObjectWriter *createObjectWriter(raw_ostream &OS) const = 0;
+
+  /// createELFObjectTargetWriter - Create a new ELFObjectTargetWriter to enable
+  /// non-standard ELFObjectWriters.
+  virtual  MCELFObjectTargetWriter *createELFObjectTargetWriter() const {
+    assert(0 && "createELFObjectTargetWriter is not supported by asm backend");
+    return 0;
+  }
+
+  /// hasReliableSymbolDifference - Check whether this target implements
+  /// accurate relocations for differences between symbols. If not, differences
+  /// between symbols will always be relocatable expressions and any references
+  /// to temporary symbols will be assumed to be in the same atom, unless they
+  /// reside in a different section.
+  ///
+  /// This should always be true (since it results in fewer relocations with no
+  /// loss of functionality), but is currently supported as a way to maintain
+  /// exact object compatibility with Darwin 'as' (on non-x86_64). It should
+  /// eventually should be eliminated.
+  bool hasReliableSymbolDifference() const {
+    return HasReliableSymbolDifference;
+  }
+
+  /// doesSectionRequireSymbols - Check whether the given section requires that
+  /// all symbols (even temporaries) have symbol table entries.
+  virtual bool doesSectionRequireSymbols(const MCSection &Section) const {
+    return false;
+  }
+
+  /// isSectionAtomizable - Check whether the given section can be split into
+  /// atoms.
+  ///
+  /// \see MCAssembler::isSymbolLinkerVisible().
+  virtual bool isSectionAtomizable(const MCSection &Section) const {
+    return true;
+  }
+
+  /// @name Target Fixup Interfaces
+  /// @{
+
+  /// getNumFixupKinds - Get the number of target specific fixup kinds.
+  virtual unsigned getNumFixupKinds() const = 0;
+
+  /// getFixupKindInfo - Get information on a fixup kind.
+  virtual const MCFixupKindInfo &getFixupKindInfo(MCFixupKind Kind) const;
+
+  /// @}
+
+  /// ApplyFixup - Apply the \arg Value for given \arg Fixup into the provided
+  /// data fragment, at the offset specified by the fixup and following the
+  /// fixup kind as appropriate.
+  virtual void ApplyFixup(const MCFixup &Fixup, char *Data, unsigned DataSize,
+                          uint64_t Value) const = 0;
+
+  /// @}
+
+  /// @name Target Relaxation Interfaces
+  /// @{
+
+  /// MayNeedRelaxation - Check whether the given instruction may need
+  /// relaxation.
+  ///
+  /// \param Inst - The instruction to test.
+  virtual bool MayNeedRelaxation(const MCInst &Inst) const = 0;
+
+  /// RelaxInstruction - Relax the instruction in the given fragment to the next
+  /// wider instruction.
+  ///
+  /// \param Inst - The instruction to relax, which may be the same as the
+  /// output.
+  /// \parm Res [output] - On return, the relaxed instruction.
+  virtual void RelaxInstruction(const MCInst &Inst, MCInst &Res) const = 0;
+
+  /// @}
+
+  /// WriteNopData - Write an (optimal) nop sequence of Count bytes to the given
+  /// output. If the target cannot generate such a sequence, it should return an
+  /// error.
+  ///
+  /// \return - True on success.
+  virtual bool WriteNopData(uint64_t Count, MCObjectWriter *OW) const = 0;
+
+  /// HandleAssemblerFlag - Handle any target-specific assembler flags.
+  /// By default, do nothing.
+  virtual void HandleAssemblerFlag(MCAssemblerFlag Flag) {}
+};
+
+} // End llvm namespace
+
+#endif
diff --git a/include/llvm/MC/TargetAsmLexer.h b/include/llvm/MC/TargetAsmLexer.h
new file mode 100644 (file)
index 0000000..9fcf449
--- /dev/null
@@ -0,0 +1,89 @@
+//===-- llvm/Target/TargetAsmLexer.h - Target Assembly Lexer ----*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_TARGET_TARGETASMLEXER_H
+#define LLVM_TARGET_TARGETASMLEXER_H
+
+#include "llvm/MC/MCParser/MCAsmLexer.h"
+
+namespace llvm {
+class Target;
+  
+/// TargetAsmLexer - Generic interface to target specific assembly lexers.
+class TargetAsmLexer {
+  /// The current token
+  AsmToken CurTok;
+  
+  /// The location and description of the current error
+  SMLoc ErrLoc;
+  std::string Err;
+  
+  TargetAsmLexer(const TargetAsmLexer &);   // DO NOT IMPLEMENT
+  void operator=(const TargetAsmLexer &);  // DO NOT IMPLEMENT
+protected: // Can only create subclasses.
+  TargetAsmLexer(const Target &);
+  
+  virtual AsmToken LexToken() = 0;
+  
+  void SetError(const SMLoc &errLoc, const std::string &err) {
+    ErrLoc = errLoc;
+    Err = err;
+  }
+  
+  /// TheTarget - The Target that this machine was created for.
+  const Target &TheTarget;
+  MCAsmLexer *Lexer;
+  
+public:
+  virtual ~TargetAsmLexer();
+  
+  const Target &getTarget() const { return TheTarget; }
+  
+  /// InstallLexer - Set the lexer to get tokens from lower-level lexer \arg L.
+  void InstallLexer(MCAsmLexer &L) {
+    Lexer = &L;
+  }
+  
+  MCAsmLexer *getLexer() {
+    return Lexer;
+  }
+  
+  /// Lex - Consume the next token from the input stream and return it.
+  const AsmToken &Lex() {
+    return CurTok = LexToken();
+  }
+  
+  /// getTok - Get the current (last) lexed token.
+  const AsmToken &getTok() {
+    return CurTok;
+  }
+  
+  /// getErrLoc - Get the current error location
+  const SMLoc &getErrLoc() {
+    return ErrLoc;
+  }
+  
+  /// getErr - Get the current error string
+  const std::string &getErr() {
+    return Err;
+  }
+  
+  /// getKind - Get the kind of current token.
+  AsmToken::TokenKind getKind() const { return CurTok.getKind(); }
+  
+  /// is - Check if the current token has kind \arg K.
+  bool is(AsmToken::TokenKind K) const { return CurTok.is(K); }
+  
+  /// isNot - Check if the current token has kind \arg K.
+  bool isNot(AsmToken::TokenKind K) const { return CurTok.isNot(K); }
+};
+
+} // End llvm namespace
+
+#endif
diff --git a/include/llvm/MC/TargetAsmParser.h b/include/llvm/MC/TargetAsmParser.h
new file mode 100644 (file)
index 0000000..df84231
--- /dev/null
@@ -0,0 +1,85 @@
+//===-- llvm/Target/TargetAsmParser.h - Target Assembly Parser --*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_TARGET_TARGETPARSER_H
+#define LLVM_TARGET_TARGETPARSER_H
+
+#include "llvm/MC/MCParser/MCAsmParserExtension.h"
+
+namespace llvm {
+class MCStreamer;
+class StringRef;
+class SMLoc;
+class AsmToken;
+class MCParsedAsmOperand;
+template <typename T> class SmallVectorImpl;
+
+/// TargetAsmParser - Generic interface to target specific assembly parsers.
+class TargetAsmParser : public MCAsmParserExtension {
+  TargetAsmParser(const TargetAsmParser &);   // DO NOT IMPLEMENT
+  void operator=(const TargetAsmParser &);  // DO NOT IMPLEMENT
+protected: // Can only create subclasses.
+  TargetAsmParser();
+  /// AvailableFeatures - The current set of available features.
+  unsigned AvailableFeatures;
+
+public:
+  virtual ~TargetAsmParser();
+
+  unsigned getAvailableFeatures() const { return AvailableFeatures; }
+  void setAvailableFeatures(unsigned Value) { AvailableFeatures = Value; }
+
+  virtual bool ParseRegister(unsigned &RegNo, SMLoc &StartLoc,
+                             SMLoc &EndLoc) = 0;
+
+  /// ParseInstruction - Parse one assembly instruction.
+  ///
+  /// The parser is positioned following the instruction name. The target
+  /// specific instruction parser should parse the entire instruction and
+  /// construct the appropriate MCInst, or emit an error. On success, the entire
+  /// line should be parsed up to and including the end-of-statement token. On
+  /// failure, the parser is not required to read to the end of the line.
+  //
+  /// \param Name - The instruction name.
+  /// \param NameLoc - The source location of the name.
+  /// \param Operands [out] - The list of parsed operands, this returns
+  ///        ownership of them to the caller.
+  /// \return True on failure.
+  virtual bool ParseInstruction(StringRef Name, SMLoc NameLoc,
+                            SmallVectorImpl<MCParsedAsmOperand*> &Operands) = 0;
+
+  /// ParseDirective - Parse a target specific assembler directive
+  ///
+  /// The parser is positioned following the directive name.  The target
+  /// specific directive parser should parse the entire directive doing or
+  /// recording any target specific work, or return true and do nothing if the
+  /// directive is not target specific. If the directive is specific for
+  /// the target, the entire line is parsed up to and including the
+  /// end-of-statement token and false is returned.
+  ///
+  /// \param DirectiveID - the identifier token of the directive.
+  virtual bool ParseDirective(AsmToken DirectiveID) = 0;
+  
+  /// MatchAndEmitInstruction - Recognize a series of operands of a parsed
+  /// instruction as an actual MCInst and emit it to the specified MCStreamer.
+  /// This returns false on success and returns true on failure to match.
+  ///
+  /// On failure, the target parser is responsible for emitting a diagnostic
+  /// explaining the match failure.
+  virtual bool 
+  MatchAndEmitInstruction(SMLoc IDLoc,
+                          SmallVectorImpl<MCParsedAsmOperand*> &Operands,
+                          MCStreamer &Out) = 0;
+  
+};
+
+} // End llvm namespace
+
+#endif
diff --git a/include/llvm/Target/TargetAsmBackend.h b/include/llvm/Target/TargetAsmBackend.h
deleted file mode 100644 (file)
index 2111f6b..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-//===-- llvm/Target/TargetAsmBackend.h - Target Asm Backend -----*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_TARGET_TARGETASMBACKEND_H
-#define LLVM_TARGET_TARGETASMBACKEND_H
-
-#include "llvm/MC/MCDirectives.h"
-#include "llvm/MC/MCFixup.h"
-#include "llvm/MC/MCFixupKindInfo.h"
-#include "llvm/Support/DataTypes.h"
-
-namespace llvm {
-class MCELFObjectTargetWriter;
-class MCFixup;
-class MCInst;
-class MCObjectWriter;
-class MCSection;
-template<typename T>
-class SmallVectorImpl;
-class raw_ostream;
-
-/// TargetAsmBackend - Generic interface to target specific assembler backends.
-class TargetAsmBackend {
-  TargetAsmBackend(const TargetAsmBackend &);   // DO NOT IMPLEMENT
-  void operator=(const TargetAsmBackend &);  // DO NOT IMPLEMENT
-protected: // Can only create subclasses.
-  TargetAsmBackend();
-
-  unsigned HasReliableSymbolDifference : 1;
-
-public:
-  virtual ~TargetAsmBackend();
-
-  /// createObjectWriter - Create a new MCObjectWriter instance for use by the
-  /// assembler backend to emit the final object file.
-  virtual MCObjectWriter *createObjectWriter(raw_ostream &OS) const = 0;
-
-  /// createELFObjectTargetWriter - Create a new ELFObjectTargetWriter to enable
-  /// non-standard ELFObjectWriters.
-  virtual  MCELFObjectTargetWriter *createELFObjectTargetWriter() const {
-    assert(0 && "createELFObjectTargetWriter is not supported by asm backend");
-    return 0;
-  }
-
-  /// hasReliableSymbolDifference - Check whether this target implements
-  /// accurate relocations for differences between symbols. If not, differences
-  /// between symbols will always be relocatable expressions and any references
-  /// to temporary symbols will be assumed to be in the same atom, unless they
-  /// reside in a different section.
-  ///
-  /// This should always be true (since it results in fewer relocations with no
-  /// loss of functionality), but is currently supported as a way to maintain
-  /// exact object compatibility with Darwin 'as' (on non-x86_64). It should
-  /// eventually should be eliminated.
-  bool hasReliableSymbolDifference() const {
-    return HasReliableSymbolDifference;
-  }
-
-  /// doesSectionRequireSymbols - Check whether the given section requires that
-  /// all symbols (even temporaries) have symbol table entries.
-  virtual bool doesSectionRequireSymbols(const MCSection &Section) const {
-    return false;
-  }
-
-  /// isSectionAtomizable - Check whether the given section can be split into
-  /// atoms.
-  ///
-  /// \see MCAssembler::isSymbolLinkerVisible().
-  virtual bool isSectionAtomizable(const MCSection &Section) const {
-    return true;
-  }
-
-  /// @name Target Fixup Interfaces
-  /// @{
-
-  /// getNumFixupKinds - Get the number of target specific fixup kinds.
-  virtual unsigned getNumFixupKinds() const = 0;
-
-  /// getFixupKindInfo - Get information on a fixup kind.
-  virtual const MCFixupKindInfo &getFixupKindInfo(MCFixupKind Kind) const;
-
-  /// @}
-
-  /// ApplyFixup - Apply the \arg Value for given \arg Fixup into the provided
-  /// data fragment, at the offset specified by the fixup and following the
-  /// fixup kind as appropriate.
-  virtual void ApplyFixup(const MCFixup &Fixup, char *Data, unsigned DataSize,
-                          uint64_t Value) const = 0;
-
-  /// @}
-
-  /// @name Target Relaxation Interfaces
-  /// @{
-
-  /// MayNeedRelaxation - Check whether the given instruction may need
-  /// relaxation.
-  ///
-  /// \param Inst - The instruction to test.
-  virtual bool MayNeedRelaxation(const MCInst &Inst) const = 0;
-
-  /// RelaxInstruction - Relax the instruction in the given fragment to the next
-  /// wider instruction.
-  ///
-  /// \param Inst - The instruction to relax, which may be the same as the
-  /// output.
-  /// \parm Res [output] - On return, the relaxed instruction.
-  virtual void RelaxInstruction(const MCInst &Inst, MCInst &Res) const = 0;
-
-  /// @}
-
-  /// WriteNopData - Write an (optimal) nop sequence of Count bytes to the given
-  /// output. If the target cannot generate such a sequence, it should return an
-  /// error.
-  ///
-  /// \return - True on success.
-  virtual bool WriteNopData(uint64_t Count, MCObjectWriter *OW) const = 0;
-
-  /// HandleAssemblerFlag - Handle any target-specific assembler flags.
-  /// By default, do nothing.
-  virtual void HandleAssemblerFlag(MCAssemblerFlag Flag) {}
-};
-
-} // End llvm namespace
-
-#endif
diff --git a/include/llvm/Target/TargetAsmLexer.h b/include/llvm/Target/TargetAsmLexer.h
deleted file mode 100644 (file)
index 9fcf449..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-//===-- llvm/Target/TargetAsmLexer.h - Target Assembly Lexer ----*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_TARGET_TARGETASMLEXER_H
-#define LLVM_TARGET_TARGETASMLEXER_H
-
-#include "llvm/MC/MCParser/MCAsmLexer.h"
-
-namespace llvm {
-class Target;
-  
-/// TargetAsmLexer - Generic interface to target specific assembly lexers.
-class TargetAsmLexer {
-  /// The current token
-  AsmToken CurTok;
-  
-  /// The location and description of the current error
-  SMLoc ErrLoc;
-  std::string Err;
-  
-  TargetAsmLexer(const TargetAsmLexer &);   // DO NOT IMPLEMENT
-  void operator=(const TargetAsmLexer &);  // DO NOT IMPLEMENT
-protected: // Can only create subclasses.
-  TargetAsmLexer(const Target &);
-  
-  virtual AsmToken LexToken() = 0;
-  
-  void SetError(const SMLoc &errLoc, const std::string &err) {
-    ErrLoc = errLoc;
-    Err = err;
-  }
-  
-  /// TheTarget - The Target that this machine was created for.
-  const Target &TheTarget;
-  MCAsmLexer *Lexer;
-  
-public:
-  virtual ~TargetAsmLexer();
-  
-  const Target &getTarget() const { return TheTarget; }
-  
-  /// InstallLexer - Set the lexer to get tokens from lower-level lexer \arg L.
-  void InstallLexer(MCAsmLexer &L) {
-    Lexer = &L;
-  }
-  
-  MCAsmLexer *getLexer() {
-    return Lexer;
-  }
-  
-  /// Lex - Consume the next token from the input stream and return it.
-  const AsmToken &Lex() {
-    return CurTok = LexToken();
-  }
-  
-  /// getTok - Get the current (last) lexed token.
-  const AsmToken &getTok() {
-    return CurTok;
-  }
-  
-  /// getErrLoc - Get the current error location
-  const SMLoc &getErrLoc() {
-    return ErrLoc;
-  }
-  
-  /// getErr - Get the current error string
-  const std::string &getErr() {
-    return Err;
-  }
-  
-  /// getKind - Get the kind of current token.
-  AsmToken::TokenKind getKind() const { return CurTok.getKind(); }
-  
-  /// is - Check if the current token has kind \arg K.
-  bool is(AsmToken::TokenKind K) const { return CurTok.is(K); }
-  
-  /// isNot - Check if the current token has kind \arg K.
-  bool isNot(AsmToken::TokenKind K) const { return CurTok.isNot(K); }
-};
-
-} // End llvm namespace
-
-#endif
diff --git a/include/llvm/Target/TargetAsmParser.h b/include/llvm/Target/TargetAsmParser.h
deleted file mode 100644 (file)
index df84231..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-//===-- llvm/Target/TargetAsmParser.h - Target Assembly Parser --*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_TARGET_TARGETPARSER_H
-#define LLVM_TARGET_TARGETPARSER_H
-
-#include "llvm/MC/MCParser/MCAsmParserExtension.h"
-
-namespace llvm {
-class MCStreamer;
-class StringRef;
-class SMLoc;
-class AsmToken;
-class MCParsedAsmOperand;
-template <typename T> class SmallVectorImpl;
-
-/// TargetAsmParser - Generic interface to target specific assembly parsers.
-class TargetAsmParser : public MCAsmParserExtension {
-  TargetAsmParser(const TargetAsmParser &);   // DO NOT IMPLEMENT
-  void operator=(const TargetAsmParser &);  // DO NOT IMPLEMENT
-protected: // Can only create subclasses.
-  TargetAsmParser();
-  /// AvailableFeatures - The current set of available features.
-  unsigned AvailableFeatures;
-
-public:
-  virtual ~TargetAsmParser();
-
-  unsigned getAvailableFeatures() const { return AvailableFeatures; }
-  void setAvailableFeatures(unsigned Value) { AvailableFeatures = Value; }
-
-  virtual bool ParseRegister(unsigned &RegNo, SMLoc &StartLoc,
-                             SMLoc &EndLoc) = 0;
-
-  /// ParseInstruction - Parse one assembly instruction.
-  ///
-  /// The parser is positioned following the instruction name. The target
-  /// specific instruction parser should parse the entire instruction and
-  /// construct the appropriate MCInst, or emit an error. On success, the entire
-  /// line should be parsed up to and including the end-of-statement token. On
-  /// failure, the parser is not required to read to the end of the line.
-  //
-  /// \param Name - The instruction name.
-  /// \param NameLoc - The source location of the name.
-  /// \param Operands [out] - The list of parsed operands, this returns
-  ///        ownership of them to the caller.
-  /// \return True on failure.
-  virtual bool ParseInstruction(StringRef Name, SMLoc NameLoc,
-                            SmallVectorImpl<MCParsedAsmOperand*> &Operands) = 0;
-
-  /// ParseDirective - Parse a target specific assembler directive
-  ///
-  /// The parser is positioned following the directive name.  The target
-  /// specific directive parser should parse the entire directive doing or
-  /// recording any target specific work, or return true and do nothing if the
-  /// directive is not target specific. If the directive is specific for
-  /// the target, the entire line is parsed up to and including the
-  /// end-of-statement token and false is returned.
-  ///
-  /// \param DirectiveID - the identifier token of the directive.
-  virtual bool ParseDirective(AsmToken DirectiveID) = 0;
-  
-  /// MatchAndEmitInstruction - Recognize a series of operands of a parsed
-  /// instruction as an actual MCInst and emit it to the specified MCStreamer.
-  /// This returns false on success and returns true on failure to match.
-  ///
-  /// On failure, the target parser is responsible for emitting a diagnostic
-  /// explaining the match failure.
-  virtual bool 
-  MatchAndEmitInstruction(SMLoc IDLoc,
-                          SmallVectorImpl<MCParsedAsmOperand*> &Operands,
-                          MCStreamer &Out) = 0;
-  
-};
-
-} // End llvm namespace
-
-#endif
index 5ac455e1a1a11d75fee41536e20451297ac10515..1a50b683ee7af55f7fa464964d20b0736ecd4a48 100644 (file)
@@ -23,7 +23,7 @@
 #include "llvm/MC/MCStreamer.h"
 #include "llvm/MC/MCSubtargetInfo.h"
 #include "llvm/MC/MCSymbol.h"
-#include "llvm/Target/TargetAsmParser.h"
+#include "llvm/MC/TargetAsmParser.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetRegistry.h"
 #include "llvm/ADT/OwningPtr.h"
index d6468749ac571c514f7c4bc2dbe75a1bce0e29d1..775e1053e664866c4c7b9e33c3b1657b373e30cd 100644 (file)
@@ -39,6 +39,7 @@ add_llvm_library(LLVMMC
   WinCOFFObjectWriter.cpp
   SubtargetFeature.cpp
   TargetAsmBackend.cpp
+  TargetAsmLexer.cpp
   )
 
 add_subdirectory(MCParser)
index 26ef1827e7b6793c786c6f9c57508898087fb0a3..44ede6c51ea9492c245cd68e885b9e73ee46b33a 100644 (file)
 #include "llvm/MC/MCExpr.h"
 #include "llvm/MC/MCSectionELF.h"
 #include "llvm/MC/MCValue.h"
+#include "llvm/MC/TargetAsmBackend.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/ELF.h"
-#include "llvm/Target/TargetAsmBackend.h"
-#include "llvm/ADT/StringSwitch.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/ADT/Statistic.h"
+#include "llvm/ADT/StringSwitch.h"
 
 #include "../Target/X86/X86FixupKinds.h"
 #include "../Target/ARM/MCTargetDesc/ARMFixupKinds.h"
index 0777f2cb5d71f7f44c06bf93f1dca9d806d88d21..9c9327ec2e5965c06c2786ca3a91060e160e1dba 100644 (file)
@@ -19,6 +19,7 @@
 #include "llvm/MC/MCSectionCOFF.h"
 #include "llvm/MC/MCSectionMachO.h"
 #include "llvm/MC/MCSymbol.h"
+#include "llvm/MC/TargetAsmBackend.h"
 #include "llvm/ADT/OwningPtr.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/StringExtras.h"
@@ -27,7 +28,6 @@
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/Format.h"
 #include "llvm/Support/FormattedStream.h"
-#include "llvm/Target/TargetAsmBackend.h"
 #include "llvm/Target/TargetLoweringObjectFile.h"
 #include <cctype>
 using namespace llvm;
index 527a63caaee55e365b44be68f32822f13a928b84..f9e549718a3c035647bcfda7eb60c841cfa70cdf 100644 (file)
@@ -18,6 +18,7 @@
 #include "llvm/MC/MCSymbol.h"
 #include "llvm/MC/MCValue.h"
 #include "llvm/MC/MCDwarf.h"
+#include "llvm/MC/TargetAsmBackend.h"
 #include "llvm/ADT/OwningPtr.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/ADT/StringExtras.h"
@@ -26,7 +27,6 @@
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Target/TargetRegistry.h"
-#include "llvm/Target/TargetAsmBackend.h"
 
 using namespace llvm;
 
index 3c5eadc6082a2baa4055994a752128bedfad6479..5f8f15f0d90c24d00fed4de90c3c90cfd97be4ca 100644 (file)
 #include "llvm/MC/MCParser/AsmLexer.h"
 #include "llvm/MC/MCParser/MCAsmParser.h"
 #include "llvm/MC/MCParser/MCParsedAsmOperand.h"
+#include "llvm/MC/TargetAsmLexer.h"
+#include "llvm/MC/TargetAsmParser.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/MemoryObject.h"
 #include "llvm/Support/SourceMgr.h"
-#include "llvm/Target/TargetAsmLexer.h"
-#include "llvm/Target/TargetAsmParser.h"
 #include "llvm/Target/TargetRegistry.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetRegisterInfo.h"
index 2c3f8e8f78661c6f8b66bb88bec5361d48b7ad9b..68f224998ff9940463d4a0b065ec36b20be52f2f 100644 (file)
@@ -15,8 +15,8 @@
 #include "llvm/MC/MCAssembler.h"
 #include "llvm/MC/MCELFSymbolFlags.h"
 #include "llvm/MC/MCFixupKindInfo.h"
+#include "llvm/MC/TargetAsmBackend.h"
 #include "llvm/Support/ELF.h"
-#include "llvm/Target/TargetAsmBackend.h"
 
 namespace llvm {
 
index 49340edbed5ee500dd85010d2f379a2777e29864..ea3c1dff66d8e67ec72d8071f8d51c9d2285bc35 100644 (file)
 #include "llvm/MC/MCSection.h"
 #include "llvm/MC/MCSymbol.h"
 #include "llvm/MC/MCValue.h"
+#include "llvm/MC/TargetAsmBackend.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ELF.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Target/TargetAsmBackend.h"
 
 using namespace llvm;
 
index fcf1aabb5a8629c5c58ba25a83dae24ca6c200d9..717ca04800f04124b62d058455556bddb3840338 100644 (file)
@@ -16,9 +16,9 @@
 #include "llvm/MC/MCContext.h"
 #include "llvm/MC/MCSymbol.h"
 #include "llvm/MC/MCValue.h"
+#include "llvm/MC/TargetAsmBackend.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Target/TargetAsmBackend.h"
 using namespace llvm;
 
 namespace {
index 1b21249ca3212ccba9071fc54b7ed98b269c6165..625b6665c53c82f3a7da30359a233f849bca6442 100644 (file)
 #include "llvm/MC/MCMachOSymbolFlags.h"
 #include "llvm/MC/MCSectionMachO.h"
 #include "llvm/MC/MCDwarf.h"
+#include "llvm/MC/TargetAsmBackend.h"
 #include "llvm/Support/Dwarf.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Target/TargetAsmBackend.h"
 
 using namespace llvm;
 
index 8635aac00302ba3384cfcc72088f6f01e5d230d7..755a56d7d4c0c9a229da3e7f8893949bed07df0f 100644 (file)
@@ -17,7 +17,7 @@
 #include "llvm/MC/MCDwarf.h"
 #include "llvm/MC/MCExpr.h"
 #include "llvm/MC/MCSymbol.h"
-#include "llvm/Target/TargetAsmBackend.h"
+#include "llvm/MC/TargetAsmBackend.h"
 using namespace llvm;
 
 MCObjectStreamer::MCObjectStreamer(MCContext &Context, TargetAsmBackend &TAB,
index 049b43268a63e0dece0092e67765d3785f907c59..3fc113c695285847b7be685d608bdb9acc4a45f6 100644 (file)
 #include "llvm/MC/MCStreamer.h"
 #include "llvm/MC/MCSymbol.h"
 #include "llvm/MC/MCDwarf.h"
+#include "llvm/MC/TargetAsmParser.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Target/TargetAsmParser.h"
 #include <cctype>
 #include <vector>
 using namespace llvm;
index 7fa4d30266040b65939113ce2bb2cadaba6079f0..a1cc5cc21d02b64dc63f002aa7cc432f657dd5b0 100644 (file)
@@ -16,7 +16,7 @@
 #include "llvm/MC/MCSectionCOFF.h"
 #include "llvm/MC/MCStreamer.h"
 #include "llvm/MC/MCExpr.h"
-#include "llvm/Target/TargetAsmParser.h"
+#include "llvm/MC/TargetAsmParser.h"
 #include "llvm/Support/COFF.h"
 using namespace llvm;
 
index 4030e41036aadec2a98e76f53e1340126689da4d..6edab334114d459e942f4e56054d7fc57062b07c 100644 (file)
@@ -8,13 +8,13 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/MC/MCParser/MCAsmParser.h"
-#include "llvm/ADT/Twine.h"
 #include "llvm/MC/MCParser/MCAsmLexer.h"
 #include "llvm/MC/MCParser/MCParsedAsmOperand.h"
+#include "llvm/MC/TargetAsmParser.h"
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/Debug.h"
-#include "llvm/Target/TargetAsmParser.h"
+#include "llvm/ADT/Twine.h"
 using namespace llvm;
 
 MCAsmParser::MCAsmParser() : TargetParser(0), ShowParsedOperands(0) {
index 512f6b04491144bb7a92997c4f17701e80caa093..0d569f6c599e71a306896796ff1fb9f34dabaec3 100644 (file)
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/Target/TargetAsmParser.h"
+#include "llvm/MC/TargetAsmParser.h"
 using namespace llvm;
 
 TargetAsmParser::TargetAsmParser()
index 69efe231ad6e97ceb0127fa3f942f06e116b0456..9260cb2be8b15bba6dbd0e658010829be503e3d3 100644 (file)
@@ -19,9 +19,9 @@
 #include "llvm/MC/MCSymbol.h"
 #include "llvm/MC/MCMachOSymbolFlags.h"
 #include "llvm/MC/MCValue.h"
+#include "llvm/MC/TargetAsmBackend.h"
 #include "llvm/Object/MachOFormat.h"
 #include "llvm/Support/ErrorHandling.h"
-#include "llvm/Target/TargetAsmBackend.h"
 
 #include <vector>
 using namespace llvm;
index 192755742535ed277eda2fa7d3c8d5c687df4527..a3845b40da12375d382db26de8d59abc25cdb490 100644 (file)
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/Target/TargetAsmBackend.h"
+#include "llvm/MC/TargetAsmBackend.h"
 using namespace llvm;
 
 TargetAsmBackend::TargetAsmBackend()
diff --git a/lib/MC/TargetAsmLexer.cpp b/lib/MC/TargetAsmLexer.cpp
new file mode 100644 (file)
index 0000000..a2ff316
--- /dev/null
@@ -0,0 +1,14 @@
+//===-- llvm/MC/TargetAsmLexer.cpp - Target Assembly Lexer ----------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/MC/TargetAsmLexer.h"
+using namespace llvm;
+
+TargetAsmLexer::TargetAsmLexer(const Target &T) : TheTarget(T), Lexer(NULL) {}
+TargetAsmLexer::~TargetAsmLexer() {}
index 6c36c1231c8354cb684ef326fab56466d09fb3db..672fcf6b1c543374d76a30b30b6b94456457c3be 100644 (file)
@@ -24,8 +24,8 @@
 #include "llvm/MC/MCCodeEmitter.h"
 #include "llvm/MC/MCSectionCOFF.h"
 #include "llvm/MC/MCWin64EH.h"
+#include "llvm/MC/TargetAsmBackend.h"
 #include "llvm/Target/TargetRegistry.h"
-#include "llvm/Target/TargetAsmBackend.h"
 #include "llvm/ADT/StringMap.h"
 
 #include "llvm/Support/COFF.h"
index ebebcdc32c909853f6c055c305f5fce2b764dcf9..4a45d76b3884e591425edc6af1c70add2013f101 100644 (file)
@@ -13,8 +13,8 @@
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCParser/MCAsmLexer.h"
 #include "llvm/MC/MCParser/MCParsedAsmOperand.h"
+#include "llvm/MC/TargetAsmLexer.h"
 
-#include "llvm/Target/TargetAsmLexer.h"
 #include "llvm/Target/TargetMachine.h"  // FIXME
 #include "llvm/Target/TargetRegistry.h"
 
index da07ea08507a42c1a7be8c6253f476c6e4c67808..1715a47d1402074c5cbf5d7af67224c365f30120 100644 (file)
@@ -21,8 +21,8 @@
 #include "llvm/MC/MCExpr.h"
 #include "llvm/MC/MCInst.h"
 #include "llvm/MC/MCSubtargetInfo.h"
+#include "llvm/MC/TargetAsmParser.h"
 #include "llvm/Target/TargetRegistry.h"
-#include "llvm/Target/TargetAsmParser.h"
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/ADT/OwningPtr.h"
index 9b293c1318157121e038a40ee069d1fedda47864..ca5aa9ae82cd24364215877cfcfc073abc374d51 100644 (file)
 #include "llvm/MC/MCObjectWriter.h"
 #include "llvm/MC/MCSectionELF.h"
 #include "llvm/MC/MCSectionMachO.h"
+#include "llvm/MC/TargetAsmBackend.h"
 #include "llvm/Object/MachOFormat.h"
 #include "llvm/Support/ELF.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Target/TargetAsmBackend.h"
 using namespace llvm;
 
 namespace {
index bc1bf3a312d167b5761786ed8941f4317986135e..41194e42b2133f429fb6fd6f969176725a996b6d 100644 (file)
@@ -17,9 +17,9 @@
 #include "llvm/MC/MCFixup.h"
 #include "llvm/MC/MCFixupKindInfo.h"
 #include "llvm/MC/MCValue.h"
+#include "llvm/MC/TargetAsmBackend.h"
 #include "llvm/Object/MachOFormat.h"
 #include "llvm/Support/ErrorHandling.h"
-#include "llvm/Target/TargetAsmBackend.h"
 using namespace llvm;
 using namespace llvm::object;
 
index a31f041474fd4a8ee95a3928db69148117384247..d91940aea4431c939693b60ff27f11fa5ff16255 100644 (file)
@@ -1,7 +1,6 @@
 add_llvm_library(LLVMTarget
   Mangler.cpp
   Target.cpp
-  TargetAsmLexer.cpp
   TargetData.cpp
   TargetELFWriterInfo.cpp
   TargetFrameLowering.cpp
index ac8caa2677e48dedd6bd7232cb01defd78f28823..953e6abfd4cbb9e2947cdaaf20f3f6cd42c3cdd8 100644 (file)
@@ -17,8 +17,8 @@
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCParser/MCAsmLexer.h"
 #include "llvm/MC/MCParser/MCParsedAsmOperand.h"
+#include "llvm/MC/TargetAsmLexer.h"
 
-#include "llvm/Target/TargetAsmLexer.h"
 #include "llvm/Target/TargetMachine.h" // FIXME
 #include "llvm/Target/TargetRegistry.h"
 
index eebd9d878943a3ff5f72e507ca40877ae84874a7..ae8d285725952b6496a2e81a84b1f1b6918739c2 100644 (file)
@@ -17,8 +17,8 @@
 #include "llvm/MC/MCStreamer.h"
 #include "llvm/MC/MCExpr.h"
 #include "llvm/MC/MCInst.h"
+#include "llvm/MC/TargetAsmParser.h"
 #include "llvm/Target/TargetRegistry.h"
-#include "llvm/Target/TargetAsmParser.h"
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/ADT/OwningPtr.h"
index 08f14c3659571306b9f203e78760539f7e37f4dd..cf619233b56b68fffd4093909d4a2c15c5e4cc86 100644 (file)
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/Target/TargetAsmBackend.h"
+#include "llvm/MC/TargetAsmBackend.h"
 #include "MBlaze.h"
 #include "MBlazeELFWriterInfo.h"
 #include "llvm/ADT/Twine.h"
@@ -24,7 +24,6 @@
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Target/TargetRegistry.h"
-#include "llvm/Target/TargetAsmBackend.h"
 using namespace llvm;
 
 static unsigned getFixupKindSize(unsigned Kind) {
index 4b8cbb7118330538adc4a1c5781755e43ac985a0..8bfacb6aa659282b95c71977442355528b88d103 100644 (file)
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/Target/TargetAsmBackend.h"
+#include "llvm/MC/TargetAsmBackend.h"
 #include "PPC.h"
 #include "PPCFixupKinds.h"
 #include "llvm/MC/MCMachObjectWriter.h"
diff --git a/lib/Target/TargetAsmLexer.cpp b/lib/Target/TargetAsmLexer.cpp
deleted file mode 100644 (file)
index d4893ff..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-//===-- llvm/Target/TargetAsmLexer.cpp - Target Assembly Lexer ------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/Target/TargetAsmLexer.h"
-using namespace llvm;
-
-TargetAsmLexer::TargetAsmLexer(const Target &T) : TheTarget(T), Lexer(NULL) {}
-TargetAsmLexer::~TargetAsmLexer() {}
index ec73087a3305f67ecf4ddf30f5da3905bacc8f59..40a100b390397cfe5b697159dabbc26e1709e6a2 100644 (file)
@@ -7,13 +7,13 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/StringExtras.h"
-#include "llvm/Target/TargetAsmLexer.h"
-#include "llvm/Target/TargetRegistry.h"
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCParser/MCAsmLexer.h"
 #include "llvm/MC/MCParser/MCParsedAsmOperand.h"
+#include "llvm/MC/TargetAsmLexer.h"
+#include "llvm/Target/TargetRegistry.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/StringExtras.h"
 #include "X86.h"
 
 using namespace llvm;
index d45dd352fbc49627d4d49240e930d103a230e10d..d09661f7fdd652f45215d4f5502b5a4f667f173e 100644 (file)
@@ -7,11 +7,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/Target/TargetAsmParser.h"
+#include "llvm/MC/TargetAsmParser.h"
 #include "X86.h"
 #include "X86Subtarget.h"
 #include "llvm/Target/TargetRegistry.h"
-#include "llvm/Target/TargetAsmParser.h"
 #include "llvm/MC/MCStreamer.h"
 #include "llvm/MC/MCExpr.h"
 #include "llvm/MC/MCInst.h"
index 9b556a55efd9d5e637d381b312dfeda50779f809..d963f336cb2db1c91056e4a524bfe94fc3f427bc 100644 (file)
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/Target/TargetAsmBackend.h"
+#include "llvm/MC/TargetAsmBackend.h"
 #include "X86.h"
 #include "X86FixupKinds.h"
 #include "llvm/ADT/Twine.h"
@@ -26,7 +26,6 @@
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Target/TargetRegistry.h"
-#include "llvm/Target/TargetAsmBackend.h"
 using namespace llvm;
 
 // Option to allow disabling arithmetic relaxation to workaround PR9807, which
index ac87eb510a99cfc7d722f5ac1052d3a8adc7a11a..fdcd94be8979a8dd5e0b8095cfd539c09ca0829c 100644 (file)
@@ -24,8 +24,8 @@
 #include "llvm/MC/MCStreamer.h"
 #include "llvm/MC/MCSubtargetInfo.h"
 #include "llvm/MC/SubtargetFeature.h"
-#include "llvm/Target/TargetAsmBackend.h"
-#include "llvm/Target/TargetAsmParser.h"
+#include "llvm/MC/TargetAsmBackend.h"
+#include "llvm/MC/TargetAsmParser.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/Target/TargetRegistry.h"
 #include "llvm/Target/TargetSelect.h"
index c1f1be4e231cb8fbd1b14faee55d4cc84029ff89..003c0892a5892f262aa728df958328610e6b15ba 100644 (file)
@@ -38,7 +38,7 @@
 #include "llvm/MC/MCSubtargetInfo.h"
 #include "llvm/MC/MCSymbol.h"
 #include "llvm/MC/SubtargetFeature.h"
-#include "llvm/Target/TargetAsmParser.h"
+#include "llvm/MC/TargetAsmParser.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetRegisterInfo.h"
 #include "llvm/Target/TargetRegistry.h"