From: Andreas Neustifter Date: Tue, 25 Aug 2009 12:53:27 +0000 (+0000) Subject: Read profile files as binary as proposed in X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cf48efcf3dc6c825a113448105763fab9de9aa53;p=oota-llvm.git Read profile files as binary as proposed in http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-August/025020.html. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79983 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/ProfileInfoLoader.cpp b/lib/Analysis/ProfileInfoLoader.cpp index eddbef3889a..f0641cf2de1 100644 --- a/lib/Analysis/ProfileInfoLoader.cpp +++ b/lib/Analysis/ProfileInfoLoader.cpp @@ -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);