tccpp: no cache for include if #elif seen

#ifndef guards are cached, however after #elif on the
same level, the file must be re-read.

Also: preprocess asm as such even when there is no
assembler (arm).
This commit is contained in:
grischka
2016-10-04 17:31:40 +02:00
parent 5805b07218
commit 1c4cf18556
2 changed files with 9 additions and 10 deletions

View File

@ -1334,13 +1334,11 @@ ST_FUNC int tcc_add_file_internal(TCCState *s1, const char *filename, int flags)
tcc_strdup(filename));
parse_flags = 0;
#ifdef CONFIG_TCC_ASM
/* if .S file, define __ASSEMBLER__ like gcc does */
if (filetype == AFF_TYPE_ASM || filetype == AFF_TYPE_ASMPP) {
tcc_define_symbol(s1, "__ASSEMBLER__", NULL);
parse_flags = PARSE_FLAG_ASM_FILE;
}
#endif
if (flags & AFF_PREPROCESS) {
ret = tcc_preprocess(s1);