From 0c8ad09040739794a7c4ac08a14614a9a1f09104 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Fri, 10 Feb 2012 12:29:57 -0800 Subject: [PATCH] Fix placement of ParserInit() call This makes it possible to use fuzz testing even without --nostdlib! --- module.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module.cpp b/module.cpp index e192c39d..102445cc 100644 --- a/module.cpp +++ b/module.cpp @@ -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