]> granicus.if.org Git - llvm/commit
[mips] Remove absolute size assertion for end directive
authorSimon Dardis <simon.dardis@imgtec.com>
Fri, 3 Feb 2017 15:48:53 +0000 (15:48 +0000)
committerSimon Dardis <simon.dardis@imgtec.com>
Fri, 3 Feb 2017 15:48:53 +0000 (15:48 +0000)
commit4692382fbf96d42aee183e35a49d8bc382b1590b
treeed6484c4f323ef136f1b6513fbe57518fe184d82
parent77ddc3f5dd699deaf3f289b647a19c4ade6587dc
[mips] Remove absolute size assertion for end directive

The .end <symbol> directive for MIPS marks the end of a symbol and sets the
symbol's size. Previously, the corresponding emitDirective handler asserted
that a function's size could be evaluated to an absolute value at that point
in time.

This cannot be done with when directives like .align have been encountered,
instead set the function's size to the corresponding symbolic expression and
let ELFObjectWriter resolve the expression to an absolute value. This avoids
a redundant call to evaluateAsAbsolute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294012 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
test/MC/Mips/end-directive.s [new file with mode: 0644]