diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-12-13 16:05:32 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-12-13 16:05:32 +0000 |
commit | dfc1470d2d69541c010131018272ed6d19bd35d6 (patch) | |
tree | 55536778adb6cc3b843470f07d85ea7de7f6322b /llvm/lib/Target/CppBackend | |
parent | a5877505d7f4bd0157a3cbbe12907157c3383c7d (diff) | |
download | bcm5719-llvm-dfc1470d2d69541c010131018272ed6d19bd35d6.tar.gz bcm5719-llvm-dfc1470d2d69541c010131018272ed6d19bd35d6.zip |
Fix pr18235.
The cpp backend is not a reasonable fallback for a missing target. It is a
very special backend, so it is reasonable to use it only if explicitly
requested.
While at it, simplify the interface a bit.
llvm-svn: 197241
Diffstat (limited to 'llvm/lib/Target/CppBackend')
-rw-r--r-- | llvm/lib/Target/CppBackend/TargetInfo/CppBackendTargetInfo.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Target/CppBackend/TargetInfo/CppBackendTargetInfo.cpp b/llvm/lib/Target/CppBackend/TargetInfo/CppBackendTargetInfo.cpp index 1ca74a4895c..096dc7350db 100644 --- a/llvm/lib/Target/CppBackend/TargetInfo/CppBackendTargetInfo.cpp +++ b/llvm/lib/Target/CppBackend/TargetInfo/CppBackendTargetInfo.cpp @@ -14,9 +14,10 @@ using namespace llvm; Target llvm::TheCppBackendTarget; -static unsigned CppBackend_TripleMatchQuality(const std::string &TT) { - // This class always works, but shouldn't be the default in most cases. - return 1; +static bool CppBackend_TripleMatchQuality(Triple::ArchType Arch) { + // This backend doesn't correspond to any architecture. It must be explicitly + // selected with -march. + return false; } extern "C" void LLVMInitializeCppBackendTargetInfo() { |