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 | 2d27b0f0ed36f8e76923c2a2b87950cce5fc433f (patch) | |
| tree | 8bafedb902a7d44e9959482a48bf1216ebab10fa /llvm/lib/MC | |
| parent | 228063cd21c4e13aba0ef7a4522b1f32e3116c18 (diff) | |
| download | bcm5719-llvm-2d27b0f0ed36f8e76923c2a2b87950cce5fc433f.tar.gz bcm5719-llvm-2d27b0f0ed36f8e76923c2a2b87950cce5fc433f.zip  | |
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.
llvm-svn: 151024
Diffstat (limited to 'llvm/lib/MC')
| -rw-r--r-- | llvm/lib/MC/MCDisassembler/EDDisassembler.cpp | 5 | 
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCDisassembler/EDDisassembler.cpp b/llvm/lib/MC/MCDisassembler/EDDisassembler.cpp index ea77902112c..35cd3d77f8d 100644 --- a/llvm/lib/MC/MCDisassembler/EDDisassembler.cpp +++ b/llvm/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);  | 

