summaryrefslogtreecommitdiff
path: root/include/nasm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/nasm.h')
-rw-r--r--include/nasm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/nasm.h b/include/nasm.h
index 046f5fb9..91dc9e6f 100644
--- a/include/nasm.h
+++ b/include/nasm.h
@@ -1284,6 +1284,7 @@ struct optimization {
*/
enum pass_type {
PASS_INIT, /* Initialization, not doing anything yet */
+ PASS_PREPROC, /* Preprocess-only mode (similar to PASS_FIRST) */
PASS_FIRST, /* The very first pass over the code */
PASS_OPT, /* Optimization pass */
PASS_STAB, /* Stabilization pass (original pass 1) */
@@ -1319,6 +1320,11 @@ static inline bool pass_final(void)
{
return pass_type() >= PASS_FINAL;
}
+/* True for code generation *or* preprocess-only mode */
+static inline bool pass_final_or_preproc(void)
+{
+ return pass_type() >= PASS_FINAL || pass_type() == PASS_PREPROC;
+}
/*
* The actual pass number. 0 is used during initialization, the very