mirror of
https://github.com/nasa/trick.git
synced 2024-12-21 06:03:10 +00:00
Detect when TRICK_ICG is used in header files and compensate for it. #375
Always differences between clang versions.
This commit is contained in:
parent
ba47c2048c
commit
b60320464a
@ -128,8 +128,13 @@ int main(int argc, char * argv[]) {
|
|||||||
hsd.addSearchDirs(include_dirs);
|
hsd.addSearchDirs(include_dirs);
|
||||||
|
|
||||||
// Add a preprocessor callback to search for TRICK_ICG
|
// Add a preprocessor callback to search for TRICK_ICG
|
||||||
|
#if (LIBCLANG_MAJOR > 3) || ((LIBCLANG_MAJOR == 3) && (LIBCLANG_MINOR >= 9))
|
||||||
|
std::unique_ptr<FindTrickICG> ftg(new FindTrickICG(ci, hsd, print_trick_icg != llvm::cl::BOU_FALSE )) ;
|
||||||
|
pp.addPPCallbacks(std::move(ftg)) ;
|
||||||
|
#else
|
||||||
FindTrickICG * ftg = new FindTrickICG(ci, hsd, print_trick_icg != llvm::cl::BOU_FALSE ) ;
|
FindTrickICG * ftg = new FindTrickICG(ci, hsd, print_trick_icg != llvm::cl::BOU_FALSE ) ;
|
||||||
pp.addPPCallbacks(ftg) ;
|
pp.addPPCallbacks(ftg) ;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (LIBCLANG_MAJOR > 3) || ((LIBCLANG_MAJOR == 3) && (LIBCLANG_MINOR >= 8))
|
#if (LIBCLANG_MAJOR > 3) || ((LIBCLANG_MAJOR == 3) && (LIBCLANG_MINOR >= 8))
|
||||||
pp.getBuiltinInfo().initializeBuiltins(pp.getIdentifierTable(), pp.getLangOpts());
|
pp.getBuiltinInfo().initializeBuiltins(pp.getIdentifierTable(), pp.getLangOpts());
|
||||||
|
Loading…
Reference in New Issue
Block a user