[LLVM-3.9] Specify that we are using the legacy interface
LLVM pass manager infrastructure is currently getting rewritten to be more flexible, but the rewrite isn't complete yet.
This commit is contained in:
parent
fba1f8f123
commit
6ed5db8d35
1 changed files with 3 additions and 3 deletions
|
@ -267,7 +267,7 @@ LLVMRustAddLibraryInfo(LLVMPassManagerRef PMB,
|
||||||
// similar code in clang's BackendUtil.cpp file.
|
// similar code in clang's BackendUtil.cpp file.
|
||||||
extern "C" void
|
extern "C" void
|
||||||
LLVMRustRunFunctionPassManager(LLVMPassManagerRef PM, LLVMModuleRef M) {
|
LLVMRustRunFunctionPassManager(LLVMPassManagerRef PM, LLVMModuleRef M) {
|
||||||
FunctionPassManager *P = unwrap<FunctionPassManager>(PM);
|
llvm::legacy::FunctionPassManager *P = unwrap<llvm::legacy::FunctionPassManager>(PM);
|
||||||
P->doInitialization();
|
P->doInitialization();
|
||||||
for (Module::iterator I = unwrap(M)->begin(),
|
for (Module::iterator I = unwrap(M)->begin(),
|
||||||
E = unwrap(M)->end(); I != E; ++I)
|
E = unwrap(M)->end(); I != E; ++I)
|
||||||
|
@ -294,7 +294,7 @@ LLVMRustWriteOutputFile(LLVMTargetMachineRef Target,
|
||||||
LLVMModuleRef M,
|
LLVMModuleRef M,
|
||||||
const char *path,
|
const char *path,
|
||||||
TargetMachine::CodeGenFileType FileType) {
|
TargetMachine::CodeGenFileType FileType) {
|
||||||
PassManager *PM = unwrap<PassManager>(PMR);
|
llvm::legacy::PassManager *PM = unwrap<llvm::legacy::PassManager>(PMR);
|
||||||
|
|
||||||
std::string ErrorInfo;
|
std::string ErrorInfo;
|
||||||
std::error_code EC;
|
std::error_code EC;
|
||||||
|
@ -320,7 +320,7 @@ extern "C" void
|
||||||
LLVMRustPrintModule(LLVMPassManagerRef PMR,
|
LLVMRustPrintModule(LLVMPassManagerRef PMR,
|
||||||
LLVMModuleRef M,
|
LLVMModuleRef M,
|
||||||
const char* path) {
|
const char* path) {
|
||||||
PassManager *PM = unwrap<PassManager>(PMR);
|
llvm::legacy::PassManager *PM = unwrap<llvm::legacy::PassManager>(PMR);
|
||||||
std::string ErrorInfo;
|
std::string ErrorInfo;
|
||||||
|
|
||||||
std::error_code EC;
|
std::error_code EC;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue