summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt22
-rwxr-xr-xsrc/ir_clang.cc4
-rw-r--r--src/transformations/loop.cc4
3 files changed, 22 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e7e8822..4dade19 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,6 +43,7 @@ set(PRINTER_SRC
)
llvm_map_components_to_libnames(llvm_libs all)
+
set(clang_libs
clangTooling
clangFrontendTool
@@ -97,11 +98,22 @@ add_executable(chill
${AST_CHILL_SRC}
${PRINTER_SRC})
-target_link_libraries(chill
- ${CORE_LIBS}
- ${llvm_libs}
- ${clang_libs}
- ${PYTHON_LIBRARY})
+link_directories(${LLVM_LIBRARY_DIRS})
+
+if (${LLVM_PACKAGE_VERSION} VERSION_LESS "3.8") # need to flip llvm with clang
+ target_link_libraries(chill
+ ${CORE_LIBS}
+ ${clang_libs}
+ ${llvm_libs}
+ ${PYTHON_LIBRARY})
+else()
+ target_link_libraries(chill
+ ${CORE_LIBS}
+ ${llvm_libs}
+ ${clang_libs}
+ ${PYTHON_LIBRARY})
+endif()
+
add_dependencies(chill omega codegen chillcg parseRel)
install(TARGETS chill
diff --git a/src/ir_clang.cc b/src/ir_clang.cc
index d30823a..2346673 100755
--- a/src/ir_clang.cc
+++ b/src/ir_clang.cc
@@ -1728,7 +1728,9 @@ IR_clangCode::~IR_clangCode() {
// TODO should output the entire file, not just the function we're working on
chillAST_SourceFile *src = chillfunc->getSourceFile();
if (src) {
- src->dump();
+ CHILL_DEBUG_BEGIN
+ src->dump();
+ CHILL_DEBUG_END
if (src->isSourceFile()) src->printToFile();
}
}
diff --git a/src/transformations/loop.cc b/src/transformations/loop.cc
index 3e040fd..5b1b80b 100644
--- a/src/transformations/loop.cc
+++ b/src/transformations/loop.cc
@@ -2364,12 +2364,12 @@ void Loop::apply_xform(std::set<int> &active) {
uninterpreted_symbols[*i].insert(
std::pair<std::string,
std::vector<omega::CG_outputRepr *> >(
- v->get_global_var()->base_name(),
+ (const char*)(v->get_global_var()->base_name()),
reprs));
uninterpreted_symbols_stringrepr[*i].insert(
std::pair<std::string,
std::vector<omega::CG_outputRepr *> >(
- v->get_global_var()->base_name(),
+ (const char*)(v->get_global_var()->base_name()),
reprs2));
}
}