[compiler-rt] r282304 - Revert "[profile] Hide lprofCurFilename"

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 23 14:58:25 PDT 2016


Author: vedantk
Date: Fri Sep 23 16:58:25 2016
New Revision: 282304

URL: http://llvm.org/viewvc/llvm-project?rev=282304&view=rev
Log:
Revert "[profile] Hide lprofCurFilename"

This reverts commit r282294. It breaks a Linux bot:

  http://lab.llvm.org:8011/builders/clang-cmake-aarch64-42vma/builds/12180

It looks like the test checks that __llvm_profile_set_filename() alters the raw
profile filename in both the dylib and the main program. Now that
lprofCurFilename is hidden, this can't work, and we get two profiles (one for
the call to "main" and one for "func").

Back this change out so that we don't affect external users.

Modified:
    compiler-rt/trunk/lib/profile/InstrProfilingFile.c

Modified: compiler-rt/trunk/lib/profile/InstrProfilingFile.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingFile.c?rev=282304&r1=282303&r2=282304&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingFile.c (original)
+++ compiler-rt/trunk/lib/profile/InstrProfilingFile.c Fri Sep 23 16:58:25 2016
@@ -82,8 +82,7 @@ typedef struct lprofFilename {
   ProfileNameSpecifier PNS;
 } lprofFilename;
 
-static lprofFilename lprofCurFilename = {0, 0, 0, {0}, {0},
-                                         0, 0, 0, PNS_unknown};
+lprofFilename lprofCurFilename = {0, 0, 0, {0}, {0}, 0, 0, 0, PNS_unknown};
 
 int getpid(void);
 static int getCurFilenameLength();




More information about the llvm-commits mailing list