[llvm-commits] [llvm-gcc-4.2] r74616 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Owen Anderson
resistor at mac.com
Wed Jul 1 10:01:20 PDT 2009
Author: resistor
Date: Wed Jul 1 12:01:19 2009
New Revision: 74616
URL: http://llvm.org/viewvc/llvm-project?rev=74616&view=rev
Log:
Update for LLVMContext+Module change.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=74616&r1=74615&r2=74616&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Wed Jul 1 12:01:19 2009
@@ -25,6 +25,7 @@
#include "llvm-file-ostream.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
+#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
#include "llvm/ModuleProvider.h"
#include "llvm/PassManager.h"
@@ -86,6 +87,7 @@
static int flag_no_implicit_float = 0;
// Global state for the LLVM backend.
+LLVMContext* Context = 0;
Module *TheModule = 0;
DebugInfo *TheDebugInfo = 0;
TargetMachine *TheTarget = 0;
@@ -418,7 +420,8 @@
int pseudo_argc = Args.size()-1;
cl::ParseCommandLineOptions(pseudo_argc, (char**)&Args[0]);
- TheModule = new Module("");
+ Context = new LLVMContext();
+ TheModule = new Module("", Context);
// If the target wants to override the architecture, e.g. turning
// powerpc-darwin-... into powerpc64-darwin-... when -m64 is enabled, do so
@@ -522,7 +525,7 @@
memcpy((char*)MB->getBufferStart(), Buffer, Size);
std::string ErrMsg;
- TheModule = ParseBitcodeFile(MB, &ErrMsg);
+ TheModule = ParseBitcodeFile(MB, Context, &ErrMsg);
delete MB;
// FIXME - Do not disable debug info while writing pch.
More information about the llvm-commits
mailing list