diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-02-21 03:39:36 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-02-21 03:39:36 +0000 |
commit | 124e51c0d2b521b0fb3aaaf2443403cd451b7857 (patch) | |
tree | e698a2f26a96b4e06e1c43c5161f782f97d933ec /lib/MC/MCDisassembler | |
parent | 4b04578d65e38cdb5077de2498889e4a174ccdfd (diff) | |
download | external_llvm-124e51c0d2b521b0fb3aaaf2443403cd451b7857.zip external_llvm-124e51c0d2b521b0fb3aaaf2443403cd451b7857.tar.gz external_llvm-124e51c0d2b521b0fb3aaaf2443403cd451b7857.tar.bz2 |
Switch the llvm::Triple class to immediately parse the triple string on
construction. Simplify its interface, implementation, and users
accordingly as there is no longer an 'uninitialized' state to check for.
Also, fixes a bug lurking in the interface as there was one method that
didn't correctly check for initialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151024 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCDisassembler')
-rw-r--r-- | lib/MC/MCDisassembler/EDDisassembler.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/MC/MCDisassembler/EDDisassembler.cpp b/lib/MC/MCDisassembler/EDDisassembler.cpp index ea77902..35cd3d7 100644 --- a/lib/MC/MCDisassembler/EDDisassembler.cpp +++ b/lib/MC/MCDisassembler/EDDisassembler.cpp @@ -47,8 +47,7 @@ static struct TripleMap triplemap[] = { { Triple::x86, "i386-unknown-unknown" }, { Triple::x86_64, "x86_64-unknown-unknown" }, { Triple::arm, "arm-unknown-unknown" }, - { Triple::thumb, "thumb-unknown-unknown" }, - { Triple::InvalidArch, NULL, } + { Triple::thumb, "thumb-unknown-unknown" } }; /// infoFromArch - Returns the TripleMap corresponding to a given architecture, @@ -128,8 +127,6 @@ EDDisassembler::EDDisassembler(CPUKey &key) : ErrorStream(nulls()), Key(key), TgtTriple(key.Triple.c_str()) { - if (TgtTriple.getArch() == Triple::InvalidArch) - return; LLVMSyntaxVariant = getLLVMSyntaxVariant(TgtTriple.getArch(), key.Syntax); |