Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable #include (new branch) #4

Open
wants to merge 1 commit into
base: dcpu16
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion lib/Lex/PPDirectives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -645,10 +645,14 @@ void Preprocessor::HandleDirective(Token &Result) {

// C99 6.10.2 - Source File Inclusion.
case tok::pp_include:
// MBG don't handle #include
break;
// Handle #include.
return HandleIncludeDirective(SavedHash.getLocation(), Result);
case tok::pp___include_macros:
// Handle -imacros.
// MBG don't handle #include
break;
// Handle -imacros.
return HandleIncludeMacrosDirective(SavedHash.getLocation(), Result);

// C99 6.10.3 - Macro Replacement.
Expand All @@ -671,8 +675,12 @@ void Preprocessor::HandleDirective(Token &Result) {

// GNU Extensions.
case tok::pp_import:
// MBG don't handle #include
break;
return HandleImportDirective(SavedHash.getLocation(), Result);
case tok::pp_include_next:
// MBG don't handle #include
break;
return HandleIncludeNextDirective(SavedHash.getLocation(), Result);

case tok::pp_warning:
Expand Down