Last active
January 6, 2018 21:33
-
-
Save Alexhuszagh/a9f15028b14e886adf240d65d365670c to your computer and use it in GitHub Desktop.
Trace Macro Expansion of Type or Function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Use as `./macro.sh $CC $HEADER $MACRO`, where CC is the | |
# C or C++ compiler desired. There must be an arg1, arg2, | |
# arg3, and, or the script will quit. | |
if [ "$#" -ne 3 ]; then | |
echo "Use: ./.sh.sh \$CC \$HEADER \$MACRO." | |
echo "Must invoke with exactly 3 args." | |
exit 1 | |
fi | |
echo | $1 -E -xc -include $2 - | grep $3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment