This is an archive of the discontinued LLVM Phabricator instance.

[IR] Don't call assertModuleIsMaterialized in release builds
ClosedPublic

Authored by craig.topper on Dec 30 2016, 10:54 PM.

Details

Summary

To fix a release vs debug build linking error, r259695 made the body of assertModuleIsMaterialized empty if Value.cpp gets compiled in a release build. This way any code compiled as a debug build can still link against a release version of the function.

This patch takes this a step farther and removes all calls to it from Value.h in any code that includes it in a relase build.

This shrinks the opt binary on my macbook build by 17240 bytes.

Diff Detail

Event Timeline

craig.topper retitled this revision from to [IR] Don't call assertModuleIsMaterialized in release builds.
craig.topper updated this object.
craig.topper added a reviewer: rafael.
craig.topper added a subscriber: llvm-commits.

Make the patch less intrusive by renaming the existing method to Impl and putting a inline method around a call to contain the #ifndefs.

This revision was automatically updated to reflect the committed changes.