Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
8e54e878
Commit
8e54e878
authored
Aug 02, 2015
by
4ast
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #105 from iovisor/bblanco_dev
Enable memory cleanup in Clang, otherwise 500KB lost per compile
parents
a151c1e8
bc6a863d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
src/cc/bpf_module.cc
src/cc/bpf_module.cc
+2
-0
No files found.
src/cc/bpf_module.cc
View file @
8e54e878
...
...
@@ -208,6 +208,7 @@ int BPFModule::load_file_module(unique_ptr<llvm::Module> *mod, const string &fil
invocation1
->
getFrontendOpts
().
Inputs
.
clear
();
invocation1
->
getFrontendOpts
().
Inputs
.
push_back
(
FrontendInputFile
(
"<bcc-memory-buffer>"
,
IK_C
));
}
invocation1
->
getFrontendOpts
().
DisableFree
=
false
;
CompilerInstance
compiler1
;
compiler1
.
setInvocation
(
invocation1
.
release
());
...
...
@@ -232,6 +233,7 @@ int BPFModule::load_file_module(unique_ptr<llvm::Module> *mod, const string &fil
llvm
::
MemoryBuffer
::
getMemBuffer
(
out_str
).
release
());
invocation2
->
getFrontendOpts
().
Inputs
.
clear
();
invocation2
->
getFrontendOpts
().
Inputs
.
push_back
(
FrontendInputFile
(
"<bcc-memory-buffer>"
,
IK_C
));
invocation2
->
getFrontendOpts
().
DisableFree
=
false
;
// suppress warnings in the 2nd pass, but bail out on errors (our fault)
invocation2
->
getDiagnosticOpts
().
IgnoreWarnings
=
true
;
compiler2
.
setInvocation
(
invocation2
.
release
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment