diff options
author | Chris Lattner <sabre@nondot.org> | 2008-06-16 20:03:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-06-16 20:03:01 +0000 |
commit | e174d3257abf4ebc765e9122a392ee56bab62fdc (patch) | |
tree | 5cee108cdaa302022e4e06715ea224e334fe367f | |
parent | 41fed26d6e6d6044403a53fc97b601e1bce82244 (diff) | |
download | external_llvm-e174d3257abf4ebc765e9122a392ee56bab62fdc.zip external_llvm-e174d3257abf4ebc765e9122a392ee56bab62fdc.tar.gz external_llvm-e174d3257abf4ebc765e9122a392ee56bab62fdc.tar.bz2 |
bail out sooner if we have two concrete but different types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52351 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Linker/LinkModules.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index 43721e6..0d521c0 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -93,6 +93,10 @@ static bool RecursiveResolveTypesI(const PATypeHolder &DestTy, // type. For example, we cannot resolve an int to a float. if (DestTyT->getTypeID() != SrcTyT->getTypeID()) return true; + // If neither type is abstract, then they really are just different types. + if (!DestTyT->isAbstract() && !SrcTyT->isAbstract()) + return true; + // Otherwise, resolve the used type used by this derived type... switch (DestTyT->getTypeID()) { default: |