-
Notifications
You must be signed in to change notification settings - Fork 38
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
Feature request: add option to enable dumping of preprocessed source (.i) #11
Comments
I will look into this. It sounds like something that should be straightforward. However, if c2ffi is crashing, please file a separate report with the issue! ;) |
Yes, c2fii crashes, but it happens in clang code (it looks like this: http://llvm.org/bugs/show_bug.cgi?id=20608) |
Hmm, if this is not reproducible with clang itself, it's very probably still a c2ffi bug ... e.g., a missing header (the most common thing I encounter) leads to a missing type error which would otherwise stop clang, but c2ffi still tries to extract useful information. I'm digging through the API ref now to see where to pull the preprocessed source, but it may not be straightforward. Also, have you tried 3.5? |
Ah, found PrintPreprocessedOutput but I haven't tested to see what you actually get. |
Notably, everything in that file is static, and I'm not yet sure how it's called directly. However, that may be unnecessary; Preprocessor::setPreprocessedOutput looks promising, and I'm adding some code now. |
All right, I've added this to master, but it's not in the 3.4 branch yet. |
This works in the 3.4 branch as well; once 3.5 rebuilds I'll make |
All right, d54f597 should complete this feature. hth. |
I used llvm 3.5 for the last tests (but it was crashing the same way). Thank you for implementation of this feature, I should test again the next week |
Ok, I've tried out Addressing those errors:
|
See #12. I've also added a |
it could be |
When clang crashes for some reason, the preprocessed source code is needed for bug report. With clang compiler you can get it by using -save-temps option (and also -E). It would be useful if c2ffi had similar option to enable generation of .i/.ii file.
The text was updated successfully, but these errors were encountered: