[llvm-commits] [llvm] r145331 - /llvm/trunk/tools/edis/EDMain.cpp
Daniel Dunbar
daniel at zuster.org
Mon Nov 28 16:06:58 PST 2011
Author: ddunbar
Date: Mon Nov 28 18:06:58 2011
New Revision: 145331
URL: http://llvm.org/viewvc/llvm-project?rev=145331&view=rev
Log:
edis: Don't do the target initialization in EDGetDisassembler, this is contrary
to the way we currently expect target selection to work -- clients are supposed
to have control over what targets are available.
Modified:
llvm/trunk/tools/edis/EDMain.cpp
Modified: llvm/trunk/tools/edis/EDMain.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDMain.cpp?rev=145331&r1=145330&r2=145331&view=diff
==============================================================================
--- llvm/trunk/tools/edis/EDMain.cpp (original)
+++ llvm/trunk/tools/edis/EDMain.cpp Mon Nov 28 18:06:58 2011
@@ -17,23 +17,12 @@
#include "../../lib/MC/MCDisassembler/EDInst.h"
#include "../../lib/MC/MCDisassembler/EDOperand.h"
#include "../../lib/MC/MCDisassembler/EDToken.h"
-#include "llvm/Support/TargetSelect.h"
#include "llvm-c/EnhancedDisassembly.h"
using namespace llvm;
int EDGetDisassembler(EDDisassemblerRef *disassembler,
const char *triple,
EDAssemblySyntax_t syntax) {
- static bool initialized;
- if (!initialized) {
- // Initialize targets and assembly printers/parsers.
- llvm::InitializeAllTargetInfos();
- llvm::InitializeAllTargetMCs();
- llvm::InitializeAllAsmParsers();
- llvm::InitializeAllDisassemblers();
- initialized = true;
- }
-
EDDisassembler::AssemblySyntax Syntax;
switch (syntax) {
default: assert(0 && "Unknown assembly syntax!");
More information about the llvm-commits
mailing list