Commit dc7eb39f authored by Alex Light's avatar Alex Light
Browse files

Refactor slicer to not have top-level header exports

It was somewhat difficult to use slicer in other projects due to it's
headers potentially shadowing/being shadowed by local headers and it
redefining several common macros with non-standard implementations. In
order to fix this issue we moved the slicer headers to a sub directory
and renamed all the macros to have a SLICER_ prefix.

% cd slicer/
% mkdir -P export/slicer
% git mv *.h export/slicer
% # Update all includes.
% for i in `find . -type f -maxdepth 1`; do
    sed -i "s/include \"/include \"slicer\//" $i;
  done
% # Update all macros to prevent collisions.
% for i in `find . -type f`; do
    sed -E -i "s/[^_]CHECK/SLICER_CHECK/" $i;
    sed -i "s/EXTRA/SLICER_EXTRA/" $i;
    sed -i "s/FATAL/SLICER_FATAL/" $i;
    sed -i "s/WEAK_CHECK/SLICER_WEAK_CHECK/" $i;
    sed -i "s/IR_TYPE/SLICER_IR_TYPE/" $i;
    sed -i "s/IR_INDEXED_TYPE/SLICER_IR_INDEXED_TYPE/" $i;
    sed -i "s/SCOPE_EXIT/SLICER_SCOPE_EXIT/g" $i;
  done

Bug: 65422458
Test: python ./dexter/dexter_tests.py -root ./testdata
Test: make checkbuild

Change-Id: I7d9b1035316feb1719591b79e3273ddc231ccbc4
parent 6bd3fd75
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment