This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Generate ABI_optimization_goals build attribute, as described in the ARM ARM.
ClosedPublic

Authored by tyomitch on Dec 4 2015, 9:38 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

tyomitch updated this revision to Diff 41893.Dec 4 2015, 9:38 AM
tyomitch retitled this revision from to [ARM] Generate ABI_optimization_goals build attribute, as described in the ARM ARM..
tyomitch updated this object.
tyomitch added a reviewer: rengolin.
tyomitch added a subscriber: llvm-commits.
rengolin added inline comments.Dec 7 2015, 6:02 AM
lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
257 ↗(On Diff #41893)

This looks like too big a hammer... Where is the pattern that breaks?

tyomitch added inline comments.Dec 7 2015, 6:09 AM
lib/Target/ARM/ARMAsmPrinter.cpp
622 ↗(On Diff #41893)

Here we're passing a reference to a local std::string to the ATS, which stays alive after this function returns, and keeps a reference to the deleted string.

lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
257 ↗(On Diff #41893)

I'd argue that this was a bug that went unnoticed for a very long while... (see below)

rengolin accepted this revision.Dec 7 2015, 6:17 AM
rengolin edited edge metadata.

LGTM. Thanks!

lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
257 ↗(On Diff #41893)

Good point. If they need to keep the value until after the call, then they need to be copied every time.

This revision is now accepted and ready to land.Dec 7 2015, 6:17 AM
This revision was automatically updated to reflect the committed changes.