From 701bd9b029176f4569942ae0437125dea8e5f64e Mon Sep 17 00:00:00 2001 From: Dmitry Babokin Date: Wed, 3 Dec 2014 18:28:32 +0300 Subject: [PATCH] Removing -debug-ir functionality for 3.6, as it was removed from LLVM. --- main.cpp | 4 ++-- opt.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index 90b263ff..b2e26a59 100644 --- a/main.cpp +++ b/main.cpp @@ -167,7 +167,7 @@ devUsage(int ret) { printf(" [--yydebug]\t\t\t\tPrint debugging information during parsing\n"); printf(" [--debug-phase=]\t\tSet optimization phases to dump. --debug-phase=first,210:220,300,305,310:last\n"); -#if !defined(LLVM_3_2) && !defined(LLVM_3_3) // LLVM 3.4+ +#if defined(LLVM_3_4) || defined(LLVM_3_5) // only 3.4 and 3.5 printf(" [--debug-ir=]\t\tSet optimization phase to generate debugIR after it\n"); #endif printf(" [--off-phase=]\t\tSwitch off optimization phases. --off-phase=first,210:220,300,305,310:last\n"); @@ -558,7 +558,7 @@ int main(int Argc, char *Argv[]) { g->debug_stages = ParsingPhases(argv[i] + strlen("--debug-phase=")); } -#if !defined(LLVM_3_2) && !defined(LLVM_3_3) // LLVM 3.4+ +#if defined(LLVM_3_4) || defined(LLVM_3_5) // only 3.4 and 3.5 else if (strncmp(argv[i], "--debug-ir=", 11) == 0) { g->debugIR = ParsingPhaseName(argv[i] + strlen("--debug-ir=")); } diff --git a/opt.cpp b/opt.cpp index 62370bcc..9b26f890 100644 --- a/opt.cpp +++ b/opt.cpp @@ -459,7 +459,7 @@ DebugPassManager::add(llvm::Pass * P, int stage = -1) { PM.add(CreateDebugPass(buf)); } -#if !defined(LLVM_3_2) && !defined(LLVM_3_3) // LLVM 3.4+ +#if defined(LLVM_3_4) || defined(LLVM_3_5) // only 3.4 and 3.5 if (g->debugIR == number) { // adding generating of LLVM IR debug after optimization char buf[100];