Cleanup: Use the C++ API to initialize the backend.

llvm-svn: 241635
This commit is contained in:
Adrian Prantl
2015-07-07 22:34:47 +00:00
parent 98cb8ba64c
commit 8b1e20690c

View File

@@ -29,6 +29,7 @@
#include "llvm/Object/COFF.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/TargetSelect.h"
#include <memory>
using namespace clang;
@@ -99,10 +100,10 @@ public:
Builder->Release();
// Initialize the backend if we haven't done so already.
LLVMInitializeAllTargetInfos();
LLVMInitializeAllTargets();
LLVMInitializeAllAsmPrinters();
LLVMInitializeAllTargetMCs();
llvm::InitializeAllTargetInfos();
llvm::InitializeAllTargets();
llvm::InitializeAllAsmPrinters();
llvm::InitializeAllTargetMCs();
// Ensure the target exists.
std::string Error;