diff options
author | whitequark <whitequark@whitequark.org> | 2018-05-10 15:05:47 +0000 |
---|---|---|
committer | whitequark <whitequark@whitequark.org> | 2018-05-10 15:05:47 +0000 |
commit | 68403564dfbcaacec89e025cc049947e6975979a (patch) | |
tree | c15ce2a53363944580189fdd1660cb26cba4e760 /llvm/lib/Transforms/Utils/FunctionComparator.cpp | |
parent | ec9b6be26fbd2444eb935fe2752fd45ef46f3b11 (diff) | |
download | bcm5719-llvm-68403564dfbcaacec89e025cc049947e6975979a.tar.gz bcm5719-llvm-68403564dfbcaacec89e025cc049947e6975979a.zip |
[PR37339] Fix assertion in FunctionComparator::cmpInlineAsm
Fixes bug https://bugs.llvm.org/show_bug.cgi?id=37339.
InlineAsm is only uniqued if the FunctionTypes are exactly the
same, while cmpTypes() for example considers all pointer types
in the default address space to be the same. For this reason
the end of cmpInlineAsm() can be reached.
This patch replaces the unreachable assertion with a check that
the function types are not identical.
Differential Revision: https://reviews.llvm.org/D46495
Reviewers: jfb
llvm-svn: 331990
Diffstat (limited to 'llvm/lib/Transforms/Utils/FunctionComparator.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/FunctionComparator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/FunctionComparator.cpp b/llvm/lib/Transforms/Utils/FunctionComparator.cpp index bddcbd86e91..75539428b68 100644 --- a/llvm/lib/Transforms/Utils/FunctionComparator.cpp +++ b/llvm/lib/Transforms/Utils/FunctionComparator.cpp @@ -710,7 +710,7 @@ int FunctionComparator::cmpInlineAsm(const InlineAsm *L, return Res; if (int Res = cmpNumbers(L->getDialect(), R->getDialect())) return Res; - llvm_unreachable("InlineAsm blocks were not uniqued."); + assert(L->getFunctionType() != R->getFunctionType()); return 0; } |