-
Notifications
You must be signed in to change notification settings - Fork 217
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
Passing external defines and incdirs to the preprocessor. #1440
Conversation
I don't understand why there was a conflict on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should move the actual implementation of the include feature to its own pull request (see comment, I think we should see if we can re-use some functionality).
So in this change, just breaking out the FileList into its own file and the corresponding changes. Then we can concentrate on the actual include implementation.
@@ -552,6 +553,134 @@ absl::Status VerilogPreprocess::HandleEndif( | |||
return absl::OkStatus(); | |||
} | |||
|
|||
// Handle `include directives. | |||
absl::Status VerilogPreprocess::HandleInclude( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you have a look how the kythe extractor and/or project_tool (I forgot where ti is implemented) does the include handling ?
Ideally we keep the ownership of the full file in one place (and then the string ownership where the tokens are pointing to is clear).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I will try to find it.
w.r.t the BUILD conflict, I was running buildifier, so that moved some lines around. essentially
This was the change 5910541 |
23c35fe
to
3d6ce49
Compare
Codecov Report
@@ Coverage Diff @@
## master #1440 +/- ##
=======================================
Coverage 92.94% 92.94%
=======================================
Files 342 343 +1
Lines 24158 24159 +1
=======================================
+ Hits 22453 22454 +1
Misses 1705 1705
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
LGTM! Thanks, merged. |
"VerilogPreprocess":
The preprocessor tool:
Implementation details:
FileList
to a separate file outsideverilog_project.h
to avoid dependency cycle.