llvm-mirror/lib/LTO
Duncan P. N. Exon Smith f163b980cd LTO: Verify the input even if optimize() isn't called
Clients may call writeMergedModules before calling optimize, or call
compileOptimized without calling optimize.  Make sure they don't sneak
past the verifier.  This adds LTOCodeGenerator::verifyMergedModuleOnce,
and calls it from writeMergedModule, optimize, and codegenOptimized.

I couldn't find a good way to test this.  I tried writing broken IR to
send into llvm-lto, but LTOCodeGenerator doesn't understand textual IR,
and assembler runs the verifier itself anyway.  Checking in
valid-but-doesn't-verify bitcode here doesn't seem valuable.

llvm-svn: 266894
2016-04-20 17:48:22 +00:00
..
CMakeLists.txt Add SVN version to libLLVMLTO 2016-04-16 07:33:14 +00:00
LLVMBuild.txt libLTO: add a ThinLTOCodeGenerator on the model of LTOCodeGenerator. 2016-03-09 01:37:22 +00:00
LTOCodeGenerator.cpp LTO: Verify the input even if optimize() isn't called 2016-04-20 17:48:22 +00:00
LTOModule.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
ThinLTOCodeGenerator.cpp Enable ODR uniquing of DITypes in more places 2016-04-19 15:48:30 +00:00
UpdateCompilerUsed.cpp Simplify LTOInternalize into UpdateLLVMCompilerUsed 2016-04-13 06:32:46 +00:00
UpdateCompilerUsed.h Simplify LTOInternalize into UpdateLLVMCompilerUsed 2016-04-13 06:32:46 +00:00