Permalink
Browse files

Recommit klickverbot's patch for LLVM-2.9.

  • Loading branch information...
1 parent 7c81278 commit 72ea04312467e25a1d0cc32de01400566381b714 @wilsonk wilsonk committed Apr 20, 2011
Showing with 221 additions and 250 deletions.
  1. +1 −1 gen/configfile.cpp
  2. +1 −1 gen/irstate.cpp
  3. +2 −1 gen/irstate.h
  4. +1 −1 gen/linker.cpp
  5. +0 −10 gen/main.cpp
  6. +3 −2 gen/nested.cpp
  7. +0 −1 gen/optimizer.cpp
  8. +1 −1 gen/programs.cpp
  9. +1 −1 gen/programs.h
  10. +205 −223 gen/todebug.cpp
  11. +1 −2 gen/todebug.h
  12. +2 −2 gen/toobj.cpp
  13. +2 −2 gen/utils.h
  14. +0 −1 ir/irmodule.h
  15. +1 −1 ir/irstruct.h
View
@@ -3,7 +3,7 @@
#include <cassert>
#include <cstring>
-#include "llvm/System/Path.h"
+#include "llvm/Support/Path.h"
#include "libconfig.h++"
View
@@ -57,7 +57,7 @@ IRTargetScope::IRTargetScope(Statement* s, EnclosingHandler* enclosinghandler, l
//////////////////////////////////////////////////////////////////////////////////////////
IRState::IRState(llvm::Module* m)
- : module(m), difactory(*m)
+ : module(m), dibuilder(*m)
{
interfaceInfoType = NULL;
mutexType = NULL;
View
@@ -13,6 +13,7 @@
#include "ir/irstruct.h"
#include "ir/irvar.h"
+#include "llvm/Analysis/DIBuilder.h"
#include "llvm/Support/CallSite.h"
namespace llvm {
@@ -157,7 +158,7 @@ struct IRState
IRBuilderHelper ir;
// debug info helper
- llvm::DIFactory difactory;
+ llvm::DIBuilder dibuilder;
// static ctors/dtors/unittests
typedef std::list<FuncDeclaration*> FuncDeclList;
View
@@ -1,7 +1,7 @@
#include "gen/linker.h"
#include "gen/llvm.h"
#include "llvm/Linker.h"
-#include "llvm/System/Program.h"
+#include "llvm/Support/Program.h"
#if _WIN32
#include "llvm/Support/SystemUtils.h"
#endif
View
@@ -7,7 +7,6 @@
#include "llvm/LinkAllVMCore.h"
#include "llvm/Linker.h"
#include "llvm/LLVMContext.h"
-#include "llvm/System/Signals.h"
#include "llvm/Target/SubtargetFeature.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
@@ -160,15 +159,6 @@ int main(int argc, char** argv)
VersionCondition::addPredefinedGlobalIdent("D_Version2");
#endif
- // merge DFLAGS environment variable into argc/argv
- getenv_setargv("DFLAGS", &argc, &argv);
-#if 0
- for (int i = 0; i < argc; i++)
- {
- printf("argv[%d] = '%s'\n", i, argv[i]);
- }
-#endif
-
// build complete fixed up list of command line arguments
std::vector<const char*> final_args;
final_args.reserve(argc);
View
@@ -7,6 +7,7 @@
#include "gen/tollvm.h"
#include "gen/functions.h"
+#include "llvm/Analysis/ValueTracking.h"
#include "llvm/Support/CommandLine.h"
namespace cl = llvm::cl;
@@ -437,7 +438,7 @@ static void DtoCreateNestedContextType(FuncDeclaration* fd) {
assert(vd->ir.irLocal->value);
LLValue* value = vd->ir.irLocal->value;
const LLType* type = value->getType();
- if (llvm::isa<llvm::AllocaInst>(value->getUnderlyingObject()))
+ if (llvm::isa<llvm::AllocaInst>(llvm::GetUnderlyingObject(value)))
// This will be copied to the nesting frame.
type = type->getContainedType(0);
types.push_back(type);
@@ -631,7 +632,7 @@ void DtoCreateNestedContext(FuncDeclaration* fd) {
Logger::println("nested param: %s", vd->toChars());
LOG_SCOPE
LLValue* value = vd->ir.irLocal->value;
- if (llvm::isa<llvm::AllocaInst>(value->getUnderlyingObject())) {
+ if (llvm::isa<llvm::AllocaInst>(llvm::GetUnderlyingObject(value))) {
Logger::println("Copying to nested frame");
// The parameter value is an alloca'd stack slot.
// Copy to the nesting frame and leave the alloca for
View
@@ -183,7 +183,6 @@ static void addPassesForOptLevel(PassManager& pm) {
addPass(pm, createLoopRotatePass());
addPass(pm, createLICMPass());
addPass(pm, createLoopUnswitchPass());
- addPass(pm, createLoopIndexSplitPass());
addPass(pm, createInstructionCombiningPass());
addPass(pm, createIndVarSimplifyPass());
addPass(pm, createLoopDeletionPass());
View
@@ -1,7 +1,7 @@
#include "gen/programs.h"
#include "llvm/Support/CommandLine.h"
-#include "llvm/System/Program.h"
+#include "llvm/Support/Program.h"
#include "root.h" // error(char*)
#include "mars.h" // fatal()
View
@@ -1,7 +1,7 @@
#ifndef LDC_GEN_PROGRAMS_H
#define LDC_GEN_PROGRAMS_H
-#include "llvm/System/Path.h"
+#include "llvm/Support/Path.h"
llvm::sys::Path getGcc();
Oops, something went wrong.

0 comments on commit 72ea043

Please sign in to comment.