diff options
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/WinException.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/WinException.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/WinException.cpp b/llvm/lib/CodeGen/AsmPrinter/WinException.cpp index 58103836a09..3999268b407 100644 --- a/llvm/lib/CodeGen/AsmPrinter/WinException.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/WinException.cpp @@ -273,12 +273,10 @@ const MCExpr *WinException::create32bitRef(const MCSymbol *Value) { Asm->OutContext); } -const MCExpr *WinException::create32bitRef(const Value *V) { - if (!V) +const MCExpr *WinException::create32bitRef(const GlobalValue *GV) { + if (!GV) return MCConstantExpr::create(0, Asm->OutContext); - if (const auto *GV = dyn_cast<GlobalValue>(V)) - return create32bitRef(Asm->getSymbol(GV)); - return create32bitRef(MMI->getAddrLabelSymbol(cast<BasicBlock>(V))); + return create32bitRef(Asm->getSymbol(GV)); } const MCExpr *WinException::getLabelPlusOne(const MCSymbol *Label) { |