-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathllvm-clang-samples.patch
74 lines (65 loc) · 2.53 KB
/
llvm-clang-samples.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
diff --git a/Makefile b/Makefile
index 0d7f600..11bcba3 100644
--- a/Makefile
+++ b/Makefile
@@ -51,7 +51,7 @@
# 6. -Wl,--start-group \ changed to -Wl, \
# 7 -Wl,--end-group changed to -Wl,
-LLVM_SRC_PATH := $$HOME/llvm/llvm_svn_rw
+LLVM_SRC_PATH := $HOME/llvm/6.0.0/llvm
# LLVM_BUILD_PATH is the directory in which you built LLVM - where you ran
# configure or cmake.
@@ -60,7 +60,7 @@ LLVM_SRC_PATH := $$HOME/llvm/llvm_svn_rw
# process. It should contain the tools like opt, llc and clang. The default
# reflects a release build with CMake and Ninja. binary build of LLVM, point it
# to the bin/ directory.
-LLVM_BUILD_PATH := $$HOME/llvm/build/svn-ninja-release
+LLVM_BUILD_PATH := $HOME/llvm/6.0.0/build/
LLVM_BIN_PATH := $(LLVM_BUILD_PATH)/bin
$(info -----------------------------------------------)
@@ -130,7 +130,7 @@ BUILDDIR := build
.PHONY: all
all: make_builddir \
- emit_build_config \
+ emit_build_config \
$(BUILDDIR)/bb_toposort_sccs \
$(BUILDDIR)/simple_module_pass \
$(BUILDDIR)/simple_bb_pass \
@@ -154,6 +154,7 @@ emit_build_config: make_builddir
.PHONY: make_builddir
make_builddir:
+ @echo "CLANG_INCLUDES: " ${CLANG_INCLUDES}
@test -d $(BUILDDIR) || mkdir $(BUILDDIR)
$(BUILDDIR)/simple_bb_pass: $(SRC_LLVM_DIR)/simple_bb_pass.cpp
diff --git a/build_vs_released_binary.sh b/build_vs_released_binary.sh
index 4aaa1ed..5aeac2f 100755
--- a/build_vs_released_binary.sh
+++ b/build_vs_released_binary.sh
@@ -15,12 +15,13 @@
set -eu
set -x
-BINARY_DIR_PATH=${BINARY_DIR_PATH:-$HOME/llvm/llvm6.0-binaries}
+BINARY_DIR_PATH=${BINARY_DIR_PATH:-$HOME/llvm/6.0.0/build}
+echo "BINARY_DIR_PATH: " ${BINARY_DIR_PATH}
make -j8 \
CXX=$BINARY_DIR_PATH/bin/clang++ \
- LLVM_SRC_PATH=$BINARY_DIR_PATH \
- LLVM_BUILD_PATH=$BINARY_DIR_PATH/bin \
+ LLVM_SRC_PATH=$HOME/llvm/6.0.0/llvm \
+ LLVM_BUILD_PATH=$BINARY_DIR_PATH \
LLVM_BIN_PATH=$BINARY_DIR_PATH/bin
make LLVM_BIN_PATH=$BINARY_DIR_PATH/bin test
diff --git a/src_clang/ClangCheck.cpp b/src_clang/ClangCheck.cpp
index cedc602..838a870 100644
--- a/src_clang/ClangCheck.cpp
+++ b/src_clang/ClangCheck.cpp
@@ -147,8 +147,7 @@ public:
if (ASTList)
return clang::CreateASTDeclNodeLister();
if (ASTDump)
- return clang::CreateASTDumper(nullptr /*Dump to stdout.*/,
- ASTDumpFilter,
+ return clang::CreateASTDumper(ASTDumpFilter,
/*DumpDecls=*/true,
/*Deserialize=*/false,
/*DumpLookups=*/false);