diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2010-12-22 13:49:56 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2010-12-22 13:49:56 +0000 |
| commit | a63db77f2ea5d3e0c1a478695ba9ee1ea04e5de2 (patch) | |
| tree | 055044d1a223bbd40cdcce55ee6002acab819724 /llvm/lib/MC/MachObjectWriter.cpp | |
| parent | 1e5be3653c417c660eb3389f88c9a3f5c0035bd9 (diff) | |
| download | bcm5719-llvm-a63db77f2ea5d3e0c1a478695ba9ee1ea04e5de2.tar.gz bcm5719-llvm-a63db77f2ea5d3e0c1a478695ba9ee1ea04e5de2.zip | |
Simplify.
llvm-svn: 122401
Diffstat (limited to 'llvm/lib/MC/MachObjectWriter.cpp')
| -rw-r--r-- | llvm/lib/MC/MachObjectWriter.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp index a4c612d0d69..a06176cad6d 100644 --- a/llvm/lib/MC/MachObjectWriter.cpp +++ b/llvm/lib/MC/MachObjectWriter.cpp @@ -906,16 +906,15 @@ public: // find a case where they are actually emitted. Type = macho::RIT_Vanilla; } else if (SD->getSymbol().isVariable()) { - const MCExpr *Value = SD->getSymbol().getVariableValue(); int64_t Res; - bool isAbs = Value->EvaluateAsAbsolute(Res, Layout, SectionAddress); - if (isAbs) { + if (SD->getSymbol().getVariableValue()->EvaluateAsAbsolute( + Res, Layout, SectionAddress)) { FixedValue = Res; return; - } else { - report_fatal_error("unsupported relocation of variable '" + - SD->getSymbol().getName() + "'"); } + + report_fatal_error("unsupported relocation of variable '" + + SD->getSymbol().getName() + "'"); } else { // Check whether we need an external or internal relocation. if (doesSymbolRequireExternRelocation(SD)) { |

