Fix regression from AST checkin that caused perf. warnings to be issued for stdlib code.
This commit is contained in:
@@ -521,11 +521,8 @@ DefineStdlib(SymbolTable *symbolTable, llvm::LLVMContext *ctx, llvm::Module *mod
|
|||||||
// definitions added. Disable emission of performance warnings for
|
// definitions added. Disable emission of performance warnings for
|
||||||
// now, since the user doesn't care about any of that in the stdlib
|
// now, since the user doesn't care about any of that in the stdlib
|
||||||
// implementation...
|
// implementation...
|
||||||
bool epf = g->emitPerfWarnings;
|
|
||||||
g->emitPerfWarnings = false;
|
|
||||||
extern char stdlib_code[];
|
extern char stdlib_code[];
|
||||||
yy_scan_string(stdlib_code);
|
yy_scan_string(stdlib_code);
|
||||||
yyparse();
|
yyparse();
|
||||||
g->emitPerfWarnings = epf;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
util.cpp
2
util.cpp
@@ -295,7 +295,7 @@ Warning(SourcePos p, const char *fmt, ...) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
PerformanceWarning(SourcePos p, const char *fmt, ...) {
|
PerformanceWarning(SourcePos p, const char *fmt, ...) {
|
||||||
if (!g->emitPerfWarnings)
|
if (!g->emitPerfWarnings || strcmp(p.name, "stdlib.ispc") == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|||||||
Reference in New Issue
Block a user