[llvm-commits] [llvm] r122401 - /llvm/trunk/lib/MC/MachObjectWriter.cpp
Daniel Dunbar
daniel at zuster.org
Wed Dec 22 05:49:56 PST 2010
Author: ddunbar
Date: Wed Dec 22 07:49:56 2010
New Revision: 122401
URL: http://llvm.org/viewvc/llvm-project?rev=122401&view=rev
Log:
Simplify.
Modified:
llvm/trunk/lib/MC/MachObjectWriter.cpp
Modified: llvm/trunk/lib/MC/MachObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MachObjectWriter.cpp?rev=122401&r1=122400&r2=122401&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MachObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/MachObjectWriter.cpp Wed Dec 22 07:49:56 2010
@@ -906,16 +906,15 @@
// 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)) {
More information about the llvm-commits
mailing list