Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
llvm-watermarker
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nagayama15
llvm-watermarker
Commits
727cab98
Commit
727cab98
authored
Nov 18, 2018
by
nagayama15
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exampleのディレクトリ構造を変更
parent
d661b54b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
55 deletions
+41
-55
Makefile
example/Makefile
+5
-31
fizzbuzz.c
example/fizzbuzz.c
+0
-24
.gitignore
example/fizzbuzz/.gitignore
+0
-0
Makefile
example/fizzbuzz/Makefile
+36
-0
No files found.
example/Makefile
View file @
727cab98
SRCS
:=
\
fizzbuzz.c
LLS
:=
${
SRCS
:.c
=.ll
}
LLS_0
:=
${
SRCS
:%.c
=%-0.ll
}
LLS_1
:=
${
SRCS
:%.c
=%-1.ll
}
LLS_2
:=
${
SRCS
:%.c
=%-2.ll
}
BINS
:=
${
LLS
:.ll
=
}
${
LLS_0
:.ll
=
}
${
LLS_1
:.ll
=
}
${
LLS_2
:.ll
=
}
.PHONY
:
all test clean
all
:
${BINS}
test
:
${BINS}
./fizzbuzz
>
fizzbuzz.txt
./fizzbuzz-0
>
fizzbuzz-0.txt
./fizzbuzz-1
>
fizzbuzz-1.txt
./fizzbuzz-2
>
fizzbuzz-2.txt
${BINS}
:
${LLS} ${LLS_0} ${LLS_1} ${LLS_2}
%.ll
:
%.c
clang
-emit-llvm
-S
-O2
-o
$@
$<
%-0.ll
:
%.ll
opt-6.0
-load
../nykk.so
-block-wm
-watermark
=
0
-S
-o
$@
$<
%-1.ll
:
%.ll
opt-6.0
-load
../nykk.so
-block-wm
-watermark
=
1
-S
-o
$@
$<
%-2.ll
:
%.ll
opt-6.0
-load
../nykk.so
-block-wm
-watermark
=
2
-S
-o
$@
$<
all
:
${
MAKE
}
-C
fizzbuzz
%
:
%.ll
clang
-o
$@
$<
test
:
${
MAKE
}
-C
fizzbuzz
test
clean
:
${
RM
}
${
BINS
}
*
.ll
*
.txt
${
MAKE
}
-C
fizzbuzz clean
example/fizzbuzz.c
deleted
100644 → 0
View file @
d661b54b
#include <stdio.h>
int
main
(
void
)
{
for
(
int
i
=
1
;
i
<=
50
;
i
++
)
{
if
(
i
%
(
3
*
5
)
==
0
)
{
printf
(
"Fizz Buzz
\n
"
);
}
else
if
(
i
%
3
==
0
)
{
printf
(
"Fizz
\n
"
);
}
else
if
(
i
%
5
==
0
)
{
printf
(
"Buzz
\n
"
);
}
else
{
printf
(
"%d
\n
"
,
i
);
}
}
}
example/.gitignore
→
example/
fizzbuzz/
.gitignore
View file @
727cab98
File moved
example/fizzbuzz/Makefile
0 → 100644
View file @
727cab98
SRCS
:=
\
fizzbuzz.c
LLS
:=
${
SRCS
:.c
=.ll
}
LLS_0
:=
${
SRCS
:%.c
=%-0.ll
}
LLS_1
:=
${
SRCS
:%.c
=%-1.ll
}
LLS_2
:=
${
SRCS
:%.c
=%-2.ll
}
BINS
:=
${
LLS
:.ll
=
}
${
LLS_0
:.ll
=
}
${
LLS_1
:.ll
=
}
${
LLS_2
:.ll
=
}
.PHONY
:
all test clean
all
:
${BINS}
test
:
${BINS}
./fizzbuzz
>
fizzbuzz.txt
./fizzbuzz-0
>
fizzbuzz-0.txt
./fizzbuzz-1
>
fizzbuzz-1.txt
./fizzbuzz-2
>
fizzbuzz-2.txt
${BINS}
:
${LLS} ${LLS_0} ${LLS_1} ${LLS_2}
%.ll
:
%.c
clang
-emit-llvm
-S
-O2
-o
$@
$<
%-0.ll
:
%.ll
opt-6.0
-load
../../nykk.so
-block-wm
-watermark
=
0
-S
-o
$@
$<
%-1.ll
:
%.ll
opt-6.0
-load
../../nykk.so
-block-wm
-watermark
=
1
-S
-o
$@
$<
%-2.ll
:
%.ll
opt-6.0
-load
../../nykk.so
-block-wm
-watermark
=
2
-S
-o
$@
$<
%
:
%.ll
clang
-o
$@
$<
clean
:
${
RM
}
${
BINS
}
*
.ll
*
.txt
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