I was reading through the tutorial at http://llvm.org/docs/tutorial/LangImpl4.html last night and ran into an issue. It was late, so I copy/pasted from the screen to test the code and missed what turned out to be a pretty clear error in the sample code.
The literalinclude of the full code from the examples directory correctly uses
TheFPM->add(...), while the example code in the tutorial has
The example in the tutorial also includes a function - createBasicAliasAnalysisPass - which is not in the example file, and if I try to add it back by hand causes the compilation to fail.
Attaching a diff with my local fixups to make it clearer (and assuming I didn’t make any fundamentally silly mistakes, I hope that’s enough to apply - but it’s been a long time since I’ve played with subversion).
LangImpl4-diff.txt (1.14 KB)