diff options
| author | Colin LeMahieu <colinl@codeaurora.org> | 2014-10-24 19:00:32 +0000 | 
|---|---|---|
| committer | Colin LeMahieu <colinl@codeaurora.org> | 2014-10-24 19:00:32 +0000 | 
| commit | 838307b31f7ecbca87fe675d6d4c9afc3eb03a40 (patch) | |
| tree | e4e9545a84dd754f0e17151cb90b6286fb79289c /llvm/unittests/MC/Hexagon/HexagonMCCodeEmitterTest.cpp | |
| parent | 65b3f547cd04e18de5a7d66088344498da19bca6 (diff) | |
| download | bcm5719-llvm-838307b31f7ecbca87fe675d6d4c9afc3eb03a40.tar.gz bcm5719-llvm-838307b31f7ecbca87fe675d6d4c9afc3eb03a40.zip | |
[Hexagon] Resubmission of 220427
Modified library structure to deal with circular dependency between HexagonInstPrinter and HexagonMCInst.
Adding encoding bits for add opcode.
Adding llvm-mc tests.
Removing unit tests.
http://reviews.llvm.org/D5624
llvm-svn: 220584
Diffstat (limited to 'llvm/unittests/MC/Hexagon/HexagonMCCodeEmitterTest.cpp')
| -rw-r--r-- | llvm/unittests/MC/Hexagon/HexagonMCCodeEmitterTest.cpp | 53 | 
1 files changed, 0 insertions, 53 deletions
| diff --git a/llvm/unittests/MC/Hexagon/HexagonMCCodeEmitterTest.cpp b/llvm/unittests/MC/Hexagon/HexagonMCCodeEmitterTest.cpp deleted file mode 100644 index 958a21fa3fc..00000000000 --- a/llvm/unittests/MC/Hexagon/HexagonMCCodeEmitterTest.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include "gtest/gtest.h" - -#include <memory> - -#include "llvm/MC/MCCodeEmitter.h" -#include "llvm/MC/MCContext.h" -#include "llvm/Support/raw_ostream.h" -#include "llvm/Support/TargetRegistry.h" -#include "llvm/Support/TargetSelect.h" - -#include "MCTargetDesc/HexagonMCInst.h" -#include "MCTargetDesc/HexagonMCTargetDesc.h" - -namespace { -class TestEmitter { -public: -  TestEmitter() : Triple("hexagon-unknown-elf") { -    LLVMInitializeHexagonTargetInfo(); -    LLVMInitializeHexagonTarget(); -    LLVMInitializeHexagonTargetMC(); -    std::string error; -    Target = llvm::TargetRegistry::lookupTarget("hexagon", error); -    assert(Target != nullptr && "Expected to find target"); -    assert(error.empty() && "Error should be empty if we have a target"); -    RegisterInfo = Target->createMCRegInfo(Triple); -    assert(RegisterInfo != nullptr && "Expecting to find register info"); -    AsmInfo = Target->createMCAsmInfo(*RegisterInfo, Triple); -    assert(AsmInfo != nullptr && "Expecting to find asm info"); -    Context = new llvm::MCContext(AsmInfo, RegisterInfo, nullptr); -    assert(Context != nullptr && "Expecting to create a context"); -    Subtarget = Target->createMCSubtargetInfo(Triple, "hexagonv4", ""); -    assert(Subtarget != nullptr && "Expecting to find a subtarget"); -    InstrInfo = Target->createMCInstrInfo(); -    assert(InstrInfo != nullptr && "Expecting to find instr info"); -    Emitter = Target->createMCCodeEmitter(*InstrInfo, *RegisterInfo, *Subtarget, -                                          *Context); -    assert(Emitter != nullptr); -  } -  std::string Triple; -  llvm::Target const *Target; -  llvm::MCRegisterInfo *RegisterInfo; -  llvm::MCAsmInfo *AsmInfo; -  llvm::MCContext *Context; -  llvm::MCSubtargetInfo *Subtarget; -  llvm::MCInstrInfo *InstrInfo; -  llvm::MCCodeEmitter *Emitter; -}; -TestEmitter Emitter; -} - -TEST(HexagonMCCodeEmitter, emitter_creation) { -  ASSERT_NE(nullptr, Emitter.Emitter); -} | 

