summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-12-22 13:49:56 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-12-22 13:49:56 +0000
commit42b5286627172b24de73e7403b60b50fc2e0db59 (patch)
tree37db3a7eb5f866b8c2f9396663cf8984ea530acc /lib
parent532c456d48c40623631ab9b3e7322a93af8d7700 (diff)
downloadllvm-42b5286627172b24de73e7403b60b50fc2e0db59.tar.gz
llvm-42b5286627172b24de73e7403b60b50fc2e0db59.tar.bz2
llvm-42b5286627172b24de73e7403b60b50fc2e0db59.tar.xz
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122401 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/MC/MachObjectWriter.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/MC/MachObjectWriter.cpp b/lib/MC/MachObjectWriter.cpp
index a4c612d0d6..a06176cad6 100644
--- a/lib/MC/MachObjectWriter.cpp
+++ b/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)) {