diff options
author | Sean Callanan <scallanan@apple.com> | 2012-02-04 07:45:35 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2012-02-04 07:45:35 +0000 |
commit | 3f4f34c7ba24c3703a0cddf778183f7d876ac83f (patch) | |
tree | 5f8d9c53910795cdf66d795de41d22d1769d5543 /lib/MC/MCDisassembler/EDDisassembler.h | |
parent | 0aad7d274d6dfb0de1ebc00600cecf5e229b7c43 (diff) |
Modified the Enhanced Disassembler to create and
cache disassemblers according to the string value
of the target triple, not according to the enum
of the triple CPU. The reason for this is that
certain attributes of the instruction set are not
reflected in the enum, but only in the string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149773 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCDisassembler/EDDisassembler.h')
-rw-r--r-- | lib/MC/MCDisassembler/EDDisassembler.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/MC/MCDisassembler/EDDisassembler.h b/lib/MC/MCDisassembler/EDDisassembler.h index 97c2d1fd99..e97f11d44c 100644 --- a/lib/MC/MCDisassembler/EDDisassembler.h +++ b/lib/MC/MCDisassembler/EDDisassembler.h @@ -25,6 +25,7 @@ #include <map> #include <set> +#include <string> #include <vector> namespace llvm { @@ -74,21 +75,21 @@ struct EDDisassembler { /// pair struct CPUKey { /// The architecture type - llvm::Triple::ArchType Arch; + std::string Triple; /// The assembly syntax AssemblySyntax Syntax; /// operator== - Equality operator bool operator==(const CPUKey &key) const { - return (Arch == key.Arch && + return (Triple == key.Triple && Syntax == key.Syntax); } /// operator< - Less-than operator bool operator<(const CPUKey &key) const { - return ((Arch < key.Arch) || - ((Arch == key.Arch) && Syntax < (key.Syntax))); + return ((Triple < key.Triple) || + ((Triple == key.Triple) && Syntax < (key.Syntax))); } }; @@ -126,8 +127,10 @@ struct EDDisassembler { /// The stream to write errors to llvm::raw_ostream &ErrorStream; - /// The architecture/syntax pair for the current architecture + /// The triple/syntax pair for the current architecture CPUKey Key; + /// The Triple fur the current architecture + Triple TgtTriple; /// The LLVM target corresponding to the disassembler const llvm::Target *Tgt; /// The assembly information for the target architecture |