Read profile files as binary as proposed in

http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-August/025020.html.

llvm-svn: 79983
This commit is contained in:
Andreas Neustifter 2009-08-25 12:53:27 +00:00
parent 6a5eaa3c89
commit 61a98072a0

View File

@ -76,7 +76,7 @@ ProfileInfoLoader::ProfileInfoLoader(const char *ToolName,
Module &TheModule) :
Filename(Filename),
M(TheModule), Warned(false) {
FILE *F = fopen(Filename.c_str(), "r");
FILE *F = fopen(Filename.c_str(), "rb");
if (F == 0) {
errs() << ToolName << ": Error opening '" << Filename << "': ";
perror(0);