OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7ef200
)
[LTO] Handle null GV in Symbol object
author
Teresa Johnson
<tejohnson@google.com>
Sat, 10 Sep 2016 06:15:26 +0000
(06:15 +0000)
committer
Teresa Johnson
<tejohnson@google.com>
Sat, 10 Sep 2016 06:15:26 +0000
(06:15 +0000)
Similar to other Symbol methods, have Symbol::getComdat handle
a null GV gracefully.
Fixes PR30326.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281134
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/LTO/LTO.h
patch
|
blob
|
history
diff --git
a/include/llvm/LTO/LTO.h
b/include/llvm/LTO/LTO.h
index
d5f3b12
..
5b684bd
100644
(file)
--- a/
include/llvm/LTO/LTO.h
+++ b/
include/llvm/LTO/LTO.h
@@
-165,6
+165,8
@@
public:
return GV && llvm::canBeOmittedFromSymbolTable(GV);
}
Expected<const Comdat *> getComdat() const {
+ if (!GV)
+ return nullptr;
const GlobalObject *GO;
if (auto *GA = dyn_cast<GlobalAlias>(GV)) {
GO = GA->getBaseObject();