Comments (3)
I'm not familiar with WPP log tracing, but it sounds like you're applying the include removal to an autogenerated file?
Well, I guess I could add an option to keep the line breaks but I hope you understand that I won't make this the default ;)
from includetoolbox.
Oh, certainly I wouldn't expect it to be the default -- although I'm not sure it'd change the behavior during the test cycle.
As far as applying the include removal to the generated file, no, that'd be silly :)
Thanks for making the change -- I'll include the rest here in case you're curious about why.
WPP log trace is how Microsoft recommends release mode log tracing is performed, especially in drivers and such. It allows logging to be performed without formatting or context, with simply a minimal encoded ID. After the fact, tools take the information from the PDB and turn the binary log into a full log that could have come from printf and friends.
Foo.cpp
#include "foo.cpp.tmh"
// The TMH file is auto-generated by tracewpp, on a PreBuild event, based on the contents of this file
WPP_TRACE(....)
The WPP_TRACE macro is defined as varying forms, but once of the common forms is:
#define WPP_(Id) WPP_EVAL(WPP_) ## WPP_EVAL(Id) ## WPP_EVAL(_) ## WPP_EVAL(WPP_THIS_FILE) ## WPP_EVAL(LINE)
Note the LINE appended to the end. inside Foo.cpp.tmh, there is a corresponding define, generated by wpptrace:
#define WPP_ANNOTATE_Foo_cpp10005
^ where 10005 is the line that made the WPP logging call at the time tracewpp was called.
So, line 10005 is hard-coded in the TMH file, which is fine as long as all builds happen with project->build -- because then pre-build events happen, and the TMH file is re-written. If it's not re-written, as is the case here, instead the CPP file tries to resolve WPP_ANNOTATE_FOO_cpp_10004, and fails.
But, in this case, it's just compile-current-file, and the WPP info is not regenerated on a individual-file basis (nor should it be, there's a noticable startup time for the tool)
from includetoolbox.
Thank you very much for the explanation! Didn't know about it, very interesting :)
from includetoolbox.
Related Issues (20)
- Trial and Error Removal for project folders HOT 2
- Can't run IWYU: Couldn't file a VCCLCompilerTool in VC++ Project. HOT 1
- Solution doesn't compile out of the box HOT 4
- Run project level trial include removal in parallel
- File name not printed if `#include` starts with "../"
- Trial & Error Include Removal ignores linker error. HOT 3
- Unable to build the vsix plugin in VS2017 HOT 1
- Add support for VS2019 HOT 1
- "error: no input files" and left-over tmp-Files since latest release HOT 2
- Listing includes in #error text
- Trial and Error Include fails instantly for every build attempt for Unreal Engine HOT 3
- Missing Microsoft.VisualStudio.Threading dependency HOT 1
- Format Includes for entire project
- pls include a new tool to help me with my project. HOT 2
- Analyse includes and fix (or suggest fixes for) any that are absolute that should be relative
- Files in "Include graph" view are not sorted
- Include graph should include a view by number of LoC
- Possibility to try all available build configurations for Trial&Error Removal
- Support Visual Studio 2022 HOT 2
- Merge with Include Minimizer, New Maintainer HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from includetoolbox.