Skip to content

Commit

Permalink
Add preserves_all helper
Browse files Browse the repository at this point in the history
Summary: Make it easier for pure analysis passes to mark their property interactions.

Reviewed By: jimmycFB

Differential Revision: D47448886

fbshipit-source-id: 2c9e3148a0dcf7faa2430f9179d9ee4a176dd1d4
  • Loading branch information
agampe authored and facebook-github-bot committed Jul 19, 2023
1 parent 26cbc5a commit 707d35d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions libredex/RedexProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,26 @@ inline const PropertyName UltralightCodePatterns("UltralightCodePatterns");

} // namespace names

namespace simple {

// Only use for plain analysis passes. Otherwise it may be better to be
// explicit.
inline PropertyInteractions preserves_all() {
using namespace redex_properties::interactions;
using namespace redex_properties::names;
return {
{DexLimitsObeyed, Preserves},
{HasSourceBlocks, Preserves},
{NeedsEverythingPublic, Preserves},
{NeedsInjectionIdLowering, Preserves},
{NoInitClassInstructions, Preserves},
{NoResolvablePureRefs, Preserves},
{NoSpuriousGetClassCalls, Preserves},
{RenameClass, Preserves},
{UltralightCodePatterns, Preserves},
};
}

} // namespace simple

} // namespace redex_properties

0 comments on commit 707d35d

Please sign in to comment.