diff options
Diffstat (limited to 'llvm/lib/MC/MCExpr.cpp')
-rw-r--r-- | llvm/lib/MC/MCExpr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp index 75bde8ed36b..9a4c41699e1 100644 --- a/llvm/lib/MC/MCExpr.cpp +++ b/llvm/lib/MC/MCExpr.cpp @@ -607,9 +607,9 @@ static bool EvaluateSymbolicAdd(const MCAssembler *Asm, } bool MCExpr::EvaluateAsRelocatable(MCValue &Res, - const MCAsmLayout &Layout) const { - return EvaluateAsRelocatableImpl(Res, &Layout.getAssembler(), &Layout, - 0, false); + const MCAsmLayout *Layout) const { + MCAssembler *Assembler = Layout ? &Layout->getAssembler() : 0; + return EvaluateAsRelocatableImpl(Res, Assembler, Layout, 0, false); } bool MCExpr::EvaluateAsRelocatableImpl(MCValue &Res, |