Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Touzeau
lrusecurity
Commits
a0b28ba3
Commit
a0b28ba3
authored
Jul 10, 2019
by
Mishigan
Committed by
Julien Balette-Pape
Jul 15, 2019
Browse files
passage aux pointeurs d'adresse
parent
1be6a9ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/lrusecurity/ACSSecurity.h
View file @
a0b28ba3
...
...
@@ -7,18 +7,23 @@
namespace
lrusecurity
{
class
ACSSecurity
:
public
elm
::
AllocArray
<
std
::
set
<
otawa
::
Address
*>>
struct
Ptr_addr_comparator
{
bool
operator
()(
const
otawa
::
Address
*
a
,
const
otawa
::
Address
*
b
)
const
{
return
*
a
<
*
b
;}
};
class
ACSSecurity
:
public
elm
::
AllocArray
<
std
::
set
<
otawa
::
Address
*
,
Ptr_addr_comparator
>>
{
public:
ACSSecurity
()
=
default
;
ACSSecurity
(
int
n
)
:
elm
::
AllocArray
<
std
::
set
<
otawa
::
Address
*>>
(
n
){
ACSSecurity
(
int
n
)
:
elm
::
AllocArray
<
std
::
set
<
otawa
::
Address
*
,
Ptr_addr_comparator
>>
(
n
){
for
(
int
i
=
0
;
i
<
n
;
i
++
)
(
*
this
)[
i
]
=
std
::
set
<
otawa
::
Address
*>
();
(
*
this
)[
i
]
=
std
::
set
<
otawa
::
Address
*
,
Ptr_addr_comparator
>
();
}
ACSSecurity
(
int
n
,
otawa
::
Address
addr
)
:
elm
::
AllocArray
<
std
::
set
<
otawa
::
Address
*>>
(
n
)
{
ACSSecurity
(
int
n
,
otawa
::
Address
addr
)
:
elm
::
AllocArray
<
std
::
set
<
otawa
::
Address
*
,
Ptr_addr_comparator
>>
(
n
)
{
for
(
int
i
=
0
;
i
<
n
;
i
++
)
(
*
this
)[
i
]
=
std
::
set
<
otawa
::
Address
*>
({
&
addr
});
(
*
this
)[
i
]
=
std
::
set
<
otawa
::
Address
*
,
Ptr_addr_comparator
>
({
&
addr
});
}
void
print
(
int
set
,
const
otawa
::
icat3
::
LBlockCollection
&
coll
,
elm
::
io
::
Output
&
out
=
elm
::
cout
)
const
;
};
...
...
Write
Preview
Supports
Markdown
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