Remove all of the now unecessary #if LLVM_REV

This commit is contained in:
Benjamin Kramer 2009-07-11 14:09:33 +02:00
parent 917bd7b901
commit 45f7401a5b
8 changed files with 3 additions and 91 deletions

View file

@ -7,17 +7,13 @@
#include "gen/llvm-version.h"
#include "llvm/LinkAllVMCore.h"
#include "llvm/Linker.h"
#if LLVM_REV >= 74640
#include "llvm/LLVMContext.h"
#endif
#include "llvm/System/Signals.h"
#include "llvm/Target/SubtargetFeature.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/Target/TargetMachineRegistry.h"
#if LLVM_REV >= 73610
#include "llvm/Target/TargetSelect.h"
#endif
#include <stdio.h>
#include <stdlib.h>
@ -406,11 +402,7 @@ int main(int argc, char** argv)
if (global.errors)
fatal();
#if LLVM_REV >= 74640
llvm::Module mod("dummy", llvm::getGlobalContext());
#else
llvm::Module mod("dummy");
#endif
// override triple if needed
const char* defaultTriple = DEFAULT_TARGET_TRIPLE;
@ -439,12 +431,10 @@ int main(int argc, char** argv)
// Allocate target machine.
// first initialize llvm
#if LLVM_REV >= 73610
#define LLVM_TARGET(A) LLVMInitialize##A##Target(); LLVMInitialize##A##AsmPrinter();
// this is defined to be LLVM_TARGET(target name 1) LLVM_TARGET(target name 2) ...
LDC_TARGETS
#undef LLVM_TARGET
#endif
// Check whether the user has explicitly specified an architecture to compile for.
if (mArch == 0)
@ -843,16 +833,12 @@ LDC_TARGETS
* not be found at link time.
*/
if (!global.params.useArrayBounds && !global.params.useAssert)
#elif LLVM_REV >= 68940
#else
// This doesn't play nice with debug info at the moment
if (!global.params.symdebug && willInline())
{
global.params.useAvailableExternally = true;
Logger::println("Running some extra semantic3's for inlining purposes");
#else
// IN_LLVM, but available_externally not available yet.
if (false)
{
#endif
{
// Do pass 3 semantic analysis on all imported modules,
@ -930,11 +916,8 @@ LDC_TARGETS
char* name = m->toChars();
char* filename = m->objfile->name->str;
#if LLVM_REV >= 74640
llvm::Linker linker(name, name, llvm::getGlobalContext());
#else
llvm::Linker linker(name, name);
#endif
std::string errormsg;
for (int i = 0; i < llvmModules.size(); i++)
{