|
14 | 14 | #include "gtest/gtest.h"
|
15 | 15 |
|
16 | 16 | #include "llvm/ExecutionEngine/Orc/CompileUtils.h"
|
| 17 | +#include "llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h" |
17 | 18 | #include "llvm/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.h"
|
18 | 19 | #include "llvm/IR/LLVMContext.h"
|
19 | 20 | #include "llvm/IR/Module.h"
|
|
28 | 29 | using namespace llvm;
|
29 | 30 | using namespace llvm::orc;
|
30 | 31 |
|
| 32 | +DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ObjectLayer, LLVMOrcObjectLayerRef) |
31 | 33 | DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ThreadSafeModule, LLVMOrcThreadSafeModuleRef)
|
32 | 34 |
|
33 | 35 | // OrcCAPITestBase contains several helper methods and pointers for unit tests
|
@@ -558,13 +560,17 @@ static LLVM_ATTRIBUTE_USED void linkComponents() {
|
558 | 560 | }
|
559 | 561 | TEST_F(OrcCAPITestBase, EnableDebugSupport) {
|
560 | 562 | #endif
|
561 |
| - if (LLVMErrorRef E = LLVMOrcLLJITEnableDebugSupport(Jit)) |
562 |
| - FAIL() << "Error testing LLJIT debug support (triple = " << TargetTriple |
563 |
| - << "): " << toString(E); |
564 |
| - |
565 | 563 | void *Before = findLastDebugDescriptorEntryPtr();
|
566 | 564 | LLVMMemoryBufferRef ObjBuffer = createTestObject(SumDebugExample, "sum.ll");
|
567 | 565 | LLVMOrcObjectLayerRef ObjLayer = LLVMOrcLLJITGetObjLinkingLayer(Jit);
|
| 566 | + |
| 567 | + if (LLVMErrorRef E = LLVMOrcLLJITEnableDebugSupport(Jit)) { |
| 568 | + EXPECT_FALSE(isa<ObjectLinkingLayer>(unwrap(ObjLayer))) |
| 569 | + << "Error testing LLJIT debug support " |
| 570 | + << "(triple = " << TargetTriple << "): " << toString(E); |
| 571 | + GTEST_SKIP() << "LLJIT C bindings provide debug support only for JITLink"; |
| 572 | + } |
| 573 | + |
568 | 574 | if (LLVMErrorRef E =
|
569 | 575 | LLVMOrcObjectLayerAddObjectFile(ObjLayer, MainDylib, ObjBuffer))
|
570 | 576 | FAIL() << "Failed to add object file to ObjLinkingLayer (triple = "
|
|
0 commit comments