File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -51,11 +51,11 @@ bool IndMemRemPass::runOnModule(Module &M) {
51
51
// to intrinsics. Therefor, this goes through and finds where the
52
52
// address of free or malloc are taken and replaces those with bounce
53
53
// functions, ensuring that all malloc and free that might happen
54
- // happens through intrinsics.
54
+ // happen through intrinsics.
55
55
bool changed = false ;
56
56
if (Function* F = M.getNamedFunction (" free" )) {
57
57
assert (F->isExternal () && " free not external?" );
58
- if (F->getNumUses ()) {
58
+ if (! F->use_empty ()) {
59
59
Function* FN = new Function (F->getFunctionType (),
60
60
GlobalValue::LinkOnceLinkage,
61
61
" free_llvm_bounce" , &M);
@@ -70,7 +70,7 @@ bool IndMemRemPass::runOnModule(Module &M) {
70
70
}
71
71
if (Function* F = M.getNamedFunction (" malloc" )) {
72
72
assert (F->isExternal () && " malloc not external?" );
73
- if (F->getNumUses ()) {
73
+ if (! F->use_empty ()) {
74
74
Function* FN = new Function (F->getFunctionType (),
75
75
GlobalValue::LinkOnceLinkage,
76
76
" malloc_llvm_bounce" , &M);
You can’t perform that action at this time.
0 commit comments