• Hans Wennborg's avatar
    [base] Move the CHECK and CHECK_op macros to more light-weight headers · c195e902
    Hans Wennborg authored
    This provides cheaper (in terms of compile time) alternatives for code
    that just wants to do a few simple CHECKs without pulling in the full
    weight of logging.h. On Linux, the preprocessed size of check.h and
    check_op.h are 2% and 62% of logging.h, respectively.
    
    Splitting the CHECK and CHECK_op macros out to separate files also
    reduces the complexity of logging.h which has become very complicated.
    
    As a bonus, the new implementation is leaner, causing a 3% local
    compile-time reduction for the chrome target on Linux even though no
    includes have been changed yet.
    
    Bug: 1031540
    Change-Id: If7aca321f077110bea0907e487d2e8d29a8c50fd
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2128112
    Commit-Queue: Nico Weber <thakis@chromium.org>
    Reviewed-by: default avatarNico Weber <thakis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#758287}
    c195e902
check_op.cc 1.63 KB