Skip to content

Commit 3aadbb8

Browse files
committed
Trick 15.3.dev does not build with clang/llvm 4.0.0 libraries. #410
Added a missing header file and backported a variation of the almostRealPath call from 17.
1 parent c489644 commit 3aadbb8

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

trick_source/codegen/Interface_Code_Gen/Utilities.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ std::string getFileName( clang::CompilerInstance & ci , clang::SourceLocation sl
6868
}
6969

7070
#include <iostream>
71+
char * almostRealPath( const std::string& in_path ) {
72+
return almostRealPath(in_path.c_str());
73+
}
74+
7175
/*
7276
This function returns almost absolute path of the directory of the incoming path.
7377
It does not follow the last symbolic link.

trick_source/codegen/Interface_Code_Gen/Utilities.hh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ std::string trim( const std::string& str, const std::string& whitespace = " \t\n
1111
bool isInUserCode( clang::CompilerInstance & ci , clang::SourceLocation sl , HeaderSearchDirs & hsd ) ;
1212
bool isInUserOrTrickCode( clang::CompilerInstance & ci , clang::SourceLocation sl , HeaderSearchDirs & hsd ) ;
1313
std::string getFileName( clang::CompilerInstance & ci , clang::SourceLocation sl , HeaderSearchDirs & hsd ) ;
14+
char * almostRealPath( const std::string& in_path ) ;
1415
char * almostRealPath( const char * in_path ) ;
1516

1617
#endif

trick_source/codegen/Interface_Code_Gen/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "clang/Basic/TargetInfo.h"
1414
#include "clang/Basic/FileManager.h"
1515
#include "clang/Lex/Preprocessor.h"
16+
#include "clang/Lex/PreprocessorOptions.h"
1617
#include "clang/Basic/Diagnostic.h"
1718
#include "clang/Parse/ParseAST.h"
1819

0 commit comments

Comments
 (0)