diff options
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r-- | include/llvm/ADT/Triple.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h index 7ae2c30..5c8244c 100644 --- a/include/llvm/ADT/Triple.h +++ b/include/llvm/ADT/Triple.h @@ -95,7 +95,7 @@ public: /// @{ Triple() : Data(""), Arch(InvalidArch) {} - explicit Triple(const char *Str) : Data(Str), Arch(InvalidArch) {} + explicit Triple(const StringRef &Str) : Data(Str), Arch(InvalidArch) {} explicit Triple(const char *ArchStr, const char *VendorStr, const char *OSStr) : Data(ArchStr), Arch(InvalidArch) { Data += '-'; @@ -212,6 +212,10 @@ public: /// getOSTypeName - Get the canonical name for the \arg Kind vendor. static const char *getOSTypeName(OSType Kind); + /// getArchTypeForLLVMName - The canonical type for the given LLVM + /// architecture name (e.g., "x86"). + static ArchType getArchTypeForLLVMName(const StringRef &Str); + /// @} }; |