Read profile files as binary as proposed in
authorAndreas Neustifter <astifter-llvm@gmx.at>
Tue, 25 Aug 2009 12:53:27 +0000 (12:53 +0000)
committerAndreas Neustifter <astifter-llvm@gmx.at>
Tue, 25 Aug 2009 12:53:27 +0000 (12:53 +0000)
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

lib/Analysis/ProfileInfoLoader.cpp

index eddbef3889ac18685fb2a7e3a238848991f136d2..f0641cf2de105b91d28f97ad6596c6dd2c2e7b73 100644 (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);