Fix placement of ParserInit() call

This makes it possible to use fuzz testing even without --nostdlib!
This commit is contained in:
Matt Pharr
2012-02-10 12:29:57 -08:00
parent 49880ab761
commit 0c8ad09040

View File

@@ -153,6 +153,9 @@ Module::CompileFile() {
llvm::UnsafeFPMath = true;
#endif // !LLVM_3_1svn
extern void ParserInit();
ParserInit();
// FIXME: it'd be nice to do this in the Module constructor, but this
// function ends up calling into routines that expect the global
// variable 'm' to be initialized and available (which it isn't until
@@ -161,9 +164,6 @@ Module::CompileFile() {
bool runPreprocessor = g->runCPP;
extern void ParserInit();
ParserInit();
if (runPreprocessor) {
if (filename != NULL) {
// Try to open the file first, since otherwise we crash in the