This is an archive of the discontinued LLVM Phabricator instance.

NFC: Silence unused function 'scaleAndAdd' in release build.
ClosedPublic

Authored by stellaraccident on Apr 7 2022, 8:28 PM.

Details

Summary

If this were C++17, we would just use a [[maybe_unused]] annotation. I'm not sure what the best way to do this without such a thing.

Diff Detail

Event Timeline

stellaraccident created this revision.Apr 7 2022, 8:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 7 2022, 8:28 PM
stellaraccident requested review of this revision.Apr 7 2022, 8:28 PM
mehdi_amini accepted this revision.Apr 7 2022, 8:43 PM

If this were C++17, we would just use a [[maybe_unused]] annotation. I'm not sure what the best way to do this without such a thing.

There is LLVM_ATTRIBUTE_UNUSED: https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Support/Compiler.h#L180

This revision is now accepted and ready to land.Apr 7 2022, 8:43 PM

If this were C++17, we would just use a [[maybe_unused]] annotation. I'm not sure what the best way to do this without such a thing.

There is LLVM_ATTRIBUTE_UNUSED: https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Support/Compiler.h#L180

Thanks - that is what I was reaching for. Updated.

This revision was landed with ongoing or failed builds.Apr 7 2022, 9:19 PM
This revision was automatically updated to reflect the committed changes.