Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
clang-hash
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Christian Dietrich
clang-hash
Commits
19a70510
Commit
19a70510
authored
Jan 30, 2017
by
Christian Dietrich
Browse files
Options
Downloads
Patches
Plain Diff
plugin: record hits and misses to logfile
parent
02d86d3e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/clang-hash.cc
+11
-0
11 additions, 0 deletions
src/clang-hash.cc
with
11 additions
and
0 deletions
src/clang-hash.cc
+
11
−
0
View file @
19a70510
...
@@ -10,6 +10,8 @@
...
@@ -10,6 +10,8 @@
#include
<utime.h>
#include
<utime.h>
#include
<sys/stat.h>
#include
<sys/stat.h>
#include
<sys/types.h>
#include
<sys/types.h>
#include
<fcntl.h>
using
namespace
clang
;
using
namespace
clang
;
...
@@ -48,6 +50,15 @@ static void link_object_file() {
...
@@ -48,6 +50,15 @@ static void link_object_file() {
dst
=
objectfile_copy
;
dst
=
objectfile_copy
;
}
}
// Record Events
if
(
getenv
(
"CLANG_HASH_LOGFILE"
))
{
int
fd
=
open
(
getenv
(
"CLANG_HASH_LOGFILE"
),
O_APPEND
|
O_WRONLY
|
O_CREAT
,
0644
);
write
(
fd
,
atexit_mode
==
ATEXIT_FROM_CACHE
?
"H"
:
"M"
,
1
);
close
(
fd
);
}
/* If destination exists, we have to unlink it. */
/* If destination exists, we have to unlink it. */
struct
stat
dummy
;
struct
stat
dummy
;
if
(
stat
(
dst
,
&
dummy
)
==
0
)
{
// exists
if
(
stat
(
dst
,
&
dummy
)
==
0
)
{
// exists
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment