projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d73e575
)
Use dyn_cast instead of isa+cast.
author
Nick Lewycky
<nicholas@mxc.ca>
Thu, 27 Jan 2011 19:42:43 +0000
(19:42 +0000)
committer
Nick Lewycky
<nicholas@mxc.ca>
Thu, 27 Jan 2011 19:42:43 +0000
(19:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124404
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/IPO/MergeFunctions.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/IPO/MergeFunctions.cpp
b/lib/Transforms/IPO/MergeFunctions.cpp
index fb55d7ce4f0ad3e375c3ea1c08b9ffc869cb9031..9abb99d04d36fd5e0ee0336e21975bb66b462acf 100644
(file)
--- a/
lib/Transforms/IPO/MergeFunctions.cpp
+++ b/
lib/Transforms/IPO/MergeFunctions.cpp
@@
-460,9
+460,8
@@
bool FunctionComparator::Enumerate(const Value *V1, const Value *V2) {
if (V1 == F2 && V2 == F1)
return true;
- if (
isa
<Constant>(V1)) {
+ if (
Constant *C1 = dyn_cast
<Constant>(V1)) {
if (V1 == V2) return true;
- const Constant *C1 = cast<Constant>(V1);
const Constant *C2 = dyn_cast<Constant>(V2);
if (!C2) return false;
// TODO: constant expressions with GEP or references to F1 or F2.