aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/CBackend
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-17 00:26:12 +0000
committerChris Lattner <sabre@nondot.org>2009-04-17 00:26:12 +0000
commit3ed055f5739e78d47ccbd7481e9f7a9d7982dc7b (patch)
treed89c4e0b584d9bdc26969d67854bef09e3eb4807 /lib/Target/CBackend
parent4c0ff85b8a6f6997a21708b9da22110b9d53ed27 (diff)
downloadexternal_llvm-3ed055f5739e78d47ccbd7481e9f7a9d7982dc7b.zip
external_llvm-3ed055f5739e78d47ccbd7481e9f7a9d7982dc7b.tar.gz
external_llvm-3ed055f5739e78d47ccbd7481e9f7a9d7982dc7b.tar.bz2
Fix some failures in targets on available_externally functions,
this fixes a crash on CodeGen/Generic/externally_available.ll on ppc hosts. Thanks to Nicholas L for pointing this out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69333 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CBackend')
-rw-r--r--lib/Target/CBackend/CBackend.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index fc99f50..8b2473b 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -116,6 +116,11 @@ namespace {
virtual bool doInitialization(Module &M);
bool runOnFunction(Function &F) {
+ // Do not codegen any 'available_externally' functions at all, they have
+ // definitions outside the translation unit.
+ if (F.hasAvailableExternallyLinkage())
+ return false;
+
LI = &getAnalysis<LoopInfo>();
// Get rid of intrinsics we can't handle.