projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d137f12
)
[ConstantFolding] ConstantFoldScalarCall1 - early-out if getLibFunc fails. NFC.
author
Simon Pilgrim
<llvm-dev@redking.me.uk>
Sat, 16 Oct 2021 10:02:13 +0000
(11:02 +0100)
committer
Simon Pilgrim
<llvm-dev@redking.me.uk>
Sat, 16 Oct 2021 10:20:18 +0000
(11:20 +0100)
llvm/lib/Analysis/ConstantFolding.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Analysis/ConstantFolding.cpp
b/llvm/lib/Analysis/ConstantFolding.cpp
index
98d886c
..
8666954
100644
(file)
--- a/
llvm/lib/Analysis/ConstantFolding.cpp
+++ b/
llvm/lib/Analysis/ConstantFolding.cpp
@@
-2065,7
+2065,9
@@
static Constant *ConstantFoldScalarCall1(StringRef Name,
return nullptr;
LibFunc Func = NotLibFunc;
- TLI->getLibFunc(Name, Func);
+ if (!TLI->getLibFunc(Name, Func))
+ return nullptr;
+
switch (Func) {
default:
break;