Skip to content

Commit

Permalink
Use def file instead of macro
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes committed Mar 3, 2014
1 parent 1f3ddaa commit 85f7870
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
8 changes: 2 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,13 @@ include_directories( ${CLANG_INCLUDE_DIRS} )
add_definitions("-fno-rtti")
add_definitions("-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS ")

if (WIN32)
add_definitions(-DCLANGPHPCHECKER_EXPORT=__declspec\(dllexport\))
else()
add_definitions(-DCLANGPHPCHECKER_EXPORT=)
endif()

add_library(clangPHPChecker SHARED PHPZPPChecker.cpp)

#target_link_libraries(clangPHPChecker ${CLANG_LIBS} ${LLVM_LIBS_CORE} )
if (WIN32)
add_library(clangPHPChecker SHARED PHPZPPChecker.cpp PHPChecker.def)
target_link_libraries(clangPHPChecker ${CLANG_LIBS} LLVMSupport )
else()
add_library(clangPHPChecker SHARED PHPZPPChecker.cpp)
target_link_libraries(clangPHPChecker)
endif()
5 changes: 5 additions & 0 deletions PHPChecker.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
LIBRARY PHPChecker
VERSION 1.0
EXPORTS
clang_registerCheckers
clang_analyzerAPIVersionString
4 changes: 2 additions & 2 deletions PHPZPPChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,10 +484,10 @@ static void initPHPChecker(CheckerManager &mgr) {
}


extern "C" CLANGPHPCHECKER_EXPORT void clang_registerCheckers(CheckerRegistry &registry) {
extern "C" void clang_registerCheckers(CheckerRegistry &registry) {
registry.addChecker(initPHPChecker, "php.ZPPChecker",
"Check zend_parse_parameters usage");
}

extern "C" CLANGPHPCHECKER_EXPORT const char clang_analyzerAPIVersionString[] =
extern "C" const char clang_analyzerAPIVersionString[] =
CLANG_ANALYZER_API_VERSION_STRING;

0 comments on commit 85f7870

Please sign in to comment.