Update ICG for clang 6

Fixes #578
This commit is contained in:
Derek Bankieris 2018-03-13 09:30:01 -05:00
parent 37b1e02455
commit 050e552d7c

View File

@ -8,6 +8,7 @@
#include "llvm/Support/Host.h" #include "llvm/Support/Host.h"
#include "llvm/Support/CommandLine.h" #include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
#include "clang/Frontend/CompilerInstance.h" #include "clang/Frontend/CompilerInstance.h"
#include "clang/Basic/TargetOptions.h" #include "clang/Basic/TargetOptions.h"
@ -58,9 +59,14 @@ Most of the main program is pieced together from examples on the web. We are doi
-# Parsing the input file. -# Parsing the input file.
*/ */
int main(int argc, char * argv[]) { int main(int argc, char * argv[]) {
llvm::cl::SetVersionPrinter([] { llvm::cl::SetVersionPrinter([]
std::cout << "Trick Interface Code Generator (trick-ICG) " << TRICK_VERSION << std::endl; #if (LIBCLANG_MAJOR >= 6)
}); (llvm::raw_ostream& stream) {stream
#else
{std::cout
#endif
<< "Trick Interface Code Generator (trick-ICG) " << TRICK_VERSION << '\n';}
);
/** /**
* Gather all of the command line arguments into lists of include directories, defines, and input files. * Gather all of the command line arguments into lists of include directories, defines, and input files.