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:
82b72be
)
AsmPrinter.cpp: Avoid crashes for targeting like "arm-mingw32". CurrentFnSym might...
author
NAKAMURA Takumi
<geek4civic@gmail.com>
Sun, 14 Jun 2015 00:23:40 +0000
(
00:23
+0000)
committer
NAKAMURA Takumi
<geek4civic@gmail.com>
Sun, 14 Jun 2015 00:23:40 +0000
(
00:23
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239692
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index cb8aa72e246d527bef6a08b917317e72abd6d469..85ee9b3b8538c98b8fd589818c267a3e2cb1d989 100644
(file)
--- a/
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@
-902,7
+902,8
@@
void AsmPrinter::EmitFunctionBody() {
const MCExpr *SizeExp = MCBinaryExpr::createSub(
MCSymbolRefExpr::create(CurrentFnEnd, OutContext),
MCSymbolRefExpr::create(CurrentFnSymForSize, OutContext), OutContext);
- OutStreamer->emitELFSize(cast<MCSymbolELF>(CurrentFnSym), SizeExp);
+ if (auto Sym = dyn_cast<MCSymbolELF>(CurrentFnSym))
+ OutStreamer->emitELFSize(Sym, SizeExp);
}
for (const HandlerInfo &HI : Handlers) {