diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-14 10:09:12 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-14 10:09:12 +0000 |
commit | 067d024b05e56d2847608c9149a7151d6531c036 (patch) | |
tree | b34d4f02d0ac9fb04d4536ae4946c1e063abd289 /include | |
parent | e79fddedcae1ee8fe7d8571db58447bc722f75dc (diff) | |
download | external_llvm-067d024b05e56d2847608c9149a7151d6531c036.zip external_llvm-067d024b05e56d2847608c9149a7151d6531c036.tar.gz external_llvm-067d024b05e56d2847608c9149a7151d6531c036.tar.bz2 |
Add llvm::sys::getHostCPUName, for detecting the LLVM name for the host CPU.
- This is an initial step towards -march=native support in Clang, and towards
eliminating host dependencies in the targets. See PR5389.
- Patch by Roman Divacky!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88768 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/System/Host.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/System/Host.h b/include/llvm/System/Host.h index 3c6aa9d..6de1a4a 100644 --- a/include/llvm/System/Host.h +++ b/include/llvm/System/Host.h @@ -41,6 +41,12 @@ namespace sys { /// CPU_TYPE-VENDOR-KERNEL-OPERATING_SYSTEM std::string getHostTriple(); + /// getHostCPUName - Get the LLVM name for the host CPU. The particular format + /// of the name is target dependent, and suitable for passing as -mcpu to the + /// target which matches the host. + /// + /// \return - The host CPU name, or empty if the CPU could not be determined. + std::string getHostCPUName(); } } |