summaryrefslogtreecommitdiff
path: root/include/llvm/System
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-14 10:09:12 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-14 10:09:12 +0000
commit067d024b05e56d2847608c9149a7151d6531c036 (patch)
treeb34d4f02d0ac9fb04d4536ae4946c1e063abd289 /include/llvm/System
parente79fddedcae1ee8fe7d8571db58447bc722f75dc (diff)
downloadllvm-067d024b05e56d2847608c9149a7151d6531c036.tar.gz
llvm-067d024b05e56d2847608c9149a7151d6531c036.tar.bz2
llvm-067d024b05e56d2847608c9149a7151d6531c036.tar.xz
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/llvm/System')
-rw-r--r--include/llvm/System/Host.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/System/Host.h b/include/llvm/System/Host.h
index 3c6aa9dd71..6de1a4a9be 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();
}
}